diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index a452d1368..403b04099 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -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"); } diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 93978162c..1d4e23ded 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -97,6 +97,7 @@ const F32 MIN_USER_FAR_CLIP = 64.f; const S32 ASPECT_RATIO_STR_LEN = 100; +void reset_to_default(const std::string& control); void reset_all_to_default(const LLView* panel) { LLView::child_list_const_iter_t end(panel->endChild()); @@ -105,7 +106,7 @@ void reset_all_to_default(const LLView* panel) const std::string& control_name((*i)->getControlName()); if (control_name.empty()) continue; if (control_name == "RenderDepthOfField") continue; // Don't touch render settings *sigh* hack - LLUI::getControlControlGroup(control_name).getControl(control_name)->resetToDefault(true); + reset_to_default(control_name); } } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 04f20c2be..a0c5551d4 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml @@ -141,11 +141,26 @@ when the Atmospheric Shaders are enabled. - - - - - + + + + + + + + +