Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alchemy
Alchemy Next
Commits
17e5349e
Commit
17e5349e
authored
Sep 09, 2021
by
Rye Mutt
🍞
Browse files
More graphics preset code cleanup
parent
68b1e535
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
indra/newview/llpresetsmanager.cpp
View file @
17e5349e
...
...
@@ -266,18 +266,6 @@ void LLPresetsManager::loadPresetNamesFromDir(const std::string& subdirectory, p
presets
=
mPresetNames
;
}
bool
LLPresetsManager
::
sCameraDirty
=
false
;
void
LLPresetsManager
::
setCameraDirty
(
bool
dirty
)
{
sCameraDirty
=
dirty
;
}
bool
LLPresetsManager
::
isCameraDirty
()
{
return
sCameraDirty
;
}
void
LLPresetsManager
::
graphicsSettingChanged
()
{
static
LLCachedControl
<
std
::
string
>
graphic_preset_active
(
gSavedSettings
,
"PresetGraphicActive"
,
""
);
...
...
@@ -285,22 +273,18 @@ void LLPresetsManager::graphicsSettingChanged()
{
gSavedSettings
.
setString
(
"PresetGraphicActive"
,
""
);
// Hack call because this is a static routine
LLPresetsManager
::
getInstance
()
->
triggerChangeSignal
();
triggerChangeSignal
();
}
}
void
LLPresetsManager
::
cameraSettingChanged
()
{
setCameraDirty
(
true
);
static
LLCachedControl
<
std
::
string
>
preset_camera_active
(
gSavedSettings
,
"PresetCameraActive"
,
""
);
if
(
!
preset_camera_active
().
empty
()
&&
!
mIgnoreChangedSignal
)
{
gSavedSettings
.
setString
(
"PresetCameraActive"
,
""
);
// Hack call because this is a static routine
LLPresetsManager
::
getInstance
()
->
triggerChangeCameraSignal
();
triggerChangeCameraSignal
();
}
}
...
...
@@ -521,7 +505,6 @@ bool LLPresetsManager::savePreset(const std::string& subdirectory, std::string n
if
(
IS_CAMERA
)
{
gSavedSettings
.
setString
(
"PresetCameraActive"
,
name
);
setCameraDirty
(
false
);
// signal interested parties
triggerChangeCameraSignal
();
}
...
...
indra/newview/llpresetsmanager.h
View file @
17e5349e
...
...
@@ -73,8 +73,6 @@ class LLPresetsManager final : public LLSingleton<LLPresetsManager>
bool
savePreset
(
const
std
::
string
&
subdirectory
,
std
::
string
name
,
bool
createDefault
=
false
);
void
loadPreset
(
const
std
::
string
&
subdirectory
,
std
::
string
name
);
bool
deletePreset
(
const
std
::
string
&
subdirectory
,
std
::
string
name
);
bool
isCameraDirty
();
static
void
setCameraDirty
(
bool
dirty
);
void
createCameraDefaultPresets
();
...
...
@@ -83,12 +81,16 @@ class LLPresetsManager final : public LLSingleton<LLPresetsManager>
void
resetCameraPreset
(
std
::
string
preset_name
);
bool
createDefaultCameraPreset
(
std
::
string
preset_name
,
bool
force_reset
=
false
);
void
setIgnoreChangeSignal
(
bool
val
)
{
mIgnoreChangedSignal
=
val
;
}
// Emitted when a preset gets loaded, deleted, or saved.
boost
::
signals2
::
connection
setPresetListChangeCameraCallback
(
const
preset_list_signal_t
::
slot_type
&
cb
);
boost
::
signals2
::
connection
setPresetListChangeCallback
(
const
preset_list_signal_t
::
slot_type
&
cb
);
// Emitted when a preset gets loaded or saved.
preset_name_list_t
mPresetNames
;
preset_list_signal_t
mPresetListChangeCameraSignal
;
...
...
@@ -106,8 +108,6 @@ class LLPresetsManager final : public LLSingleton<LLPresetsManager>
std
::
vector
<
boost
::
signals2
::
connection
>
mCameraChangedSignals
;
bool
mIgnoreChangedSignal
=
false
;
static
bool
sCameraDirty
;
};
#endif // LL_PRESETSMANAGER_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment