summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2024-01-17 00:30:37 +0200
committerGitHub <noreply@github.com>2024-01-17 00:30:37 +0200
commit469f2621f170484943093a830ec385f1b8d20934 (patch)
tree43065026a9c69b195f7e0a812c8b260bd068ed1d /indra/newview/llfloaterpreference.cpp
parent0249eefe53f2267a179a1271ae21b9c9af878ca9 (diff)
SL-20708 don't reset "Quality & speed" slider when canceling Advanced Settings
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index aa723eb3a8..d15c52cc24 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -620,7 +620,7 @@ void LLFloaterPreference::apply()
saveAvatarProperties();
}
-void LLFloaterPreference::cancel()
+void LLFloaterPreference::cancel(const std::vector<std::string> settings_to_skip)
{
LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core");
// Call cancel() on all panels that derive from LLPanelPreference
@@ -630,7 +630,7 @@ void LLFloaterPreference::cancel()
LLView* view = *iter;
LLPanelPreference* panel = dynamic_cast<LLPanelPreference*>(view);
if (panel)
- panel->cancel();
+ panel->cancel(settings_to_skip);
}
// hide joystick pref floater
LLFloaterReg::hideInstance("pref_joystick");
@@ -1011,15 +1011,16 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata)
}
refresh();
}
- cancel();
-
+
if (userdata.asString() == "closeadvanced")
{
+ cancel({"RenderQualityPerformance"});
LLFloaterReg::hideInstance("prefs_graphics_advanced");
updateMaxComplexity();
}
else
{
+ cancel();
closeFloater();
}
}
@@ -2206,7 +2207,7 @@ void LLPanelPreference::toggleMuteWhenMinimized()
}
}
-void LLPanelPreference::cancel()
+void LLPanelPreference::cancel(const std::vector<std::string> settings_to_skip)
{
for (control_values_map_t::iterator iter = mSavedValues.begin();
iter != mSavedValues.end(); ++iter)
@@ -2219,6 +2220,12 @@ void LLPanelPreference::cancel()
continue;
}
+ auto found = std::find(settings_to_skip.begin(), settings_to_skip.end(), control->getName());
+ if (found != settings_to_skip.end())
+ {
+ continue;
+ }
+
control->set(ctrl_value);
}
@@ -2461,9 +2468,9 @@ void LLPanelPreferenceGraphics::resetDirtyChilds()
}
}
-void LLPanelPreferenceGraphics::cancel()
+void LLPanelPreferenceGraphics::cancel(const std::vector<std::string> settings_to_skip)
{
- LLPanelPreference::cancel();
+ LLPanelPreference::cancel(settings_to_skip);
}
void LLPanelPreferenceGraphics::saveSettings()
{
@@ -2751,7 +2758,7 @@ void LLPanelPreferenceControls::apply()
}
}
-void LLPanelPreferenceControls::cancel()
+void LLPanelPreferenceControls::cancel(const std::vector<std::string> settings_to_skip)
{
for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i)
{