SL-20708 don't reset "Quality & speed" slider when canceling Advanced Settings
parent
0249eefe53
commit
469f2621f1
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public:
|
|||
~LLFloaterPreference();
|
||||
|
||||
void apply();
|
||||
void cancel();
|
||||
void cancel(const std::vector<std::string> settings_to_skip = {});
|
||||
/*virtual*/ void draw();
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
|
|
@ -251,7 +251,7 @@ public:
|
|||
virtual ~LLPanelPreference();
|
||||
|
||||
virtual void apply();
|
||||
virtual void cancel();
|
||||
virtual void cancel(const std::vector<std::string> settings_to_skip = {});
|
||||
void setControlFalse(const LLSD& user_data);
|
||||
virtual void setHardwareDefaults();
|
||||
|
||||
|
|
@ -294,14 +294,12 @@ class LLPanelPreferenceGraphics : public LLPanelPreference
|
|||
public:
|
||||
BOOL postBuild();
|
||||
void draw();
|
||||
void cancel();
|
||||
void cancel(const std::vector<std::string> settings_to_skip = {});
|
||||
void saveSettings();
|
||||
void resetDirtyChilds();
|
||||
void setHardwareDefaults();
|
||||
void setPresetText();
|
||||
|
||||
static const std::string getPresetsPath();
|
||||
|
||||
protected:
|
||||
bool hasDirtyChilds();
|
||||
|
||||
|
|
@ -320,7 +318,7 @@ public:
|
|||
BOOL postBuild();
|
||||
|
||||
void apply();
|
||||
void cancel();
|
||||
void cancel(const std::vector<std::string> settings_to_skip = {});
|
||||
void saveSettings();
|
||||
void resetDirtyChilds();
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void LLFloaterPreferenceGraphicsAdvanced::onClickCloseBtn(bool app_quitting)
|
|||
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");
|
||||
if (instance)
|
||||
{
|
||||
instance->cancel();
|
||||
instance->cancel({"RenderQualityPerformance"});
|
||||
}
|
||||
updateMaxComplexity();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue