Per-slider reset buttons? Sure.

Adds callback to registrar: "Prefs.Reset", pass debug setting name as parameter.
This commit is contained in:
Inusaito Sayori
2014-08-07 20:29:12 -04:00
parent 20ea0968da
commit 21d54edeb9
3 changed files with 28 additions and 6 deletions

View File

@@ -341,9 +341,15 @@ void LLPreferenceCore::setPersonalInfo(const std::string& visibility, bool im_vi
//////////////////////////////////////////////
// LLFloaterPreference
void reset_to_default(const std::string& control)
{
LLUI::getControlControlGroup(control).getControl(control)->resetToDefault(true);
}
LLFloaterPreference::LLFloaterPreference()
{
mExitWithoutSaving = false;
mCommitCallbackRegistrar.add("Prefs.Reset", boost::bind(reset_to_default, _2));
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preferences.xml");
}