diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp index 43ebbcc34..93978162c 100644 --- a/indra/newview/llpaneldisplay.cpp +++ b/indra/newview/llpaneldisplay.cpp @@ -97,8 +97,21 @@ const F32 MIN_USER_FAR_CLIP = 64.f; const S32 ASPECT_RATIO_STR_LEN = 100; +void reset_all_to_default(const LLView* panel) +{ + LLView::child_list_const_iter_t end(panel->endChild()); + for (LLView::child_list_const_iter_t i = panel->beginChild(); i != end; ++i) + { + 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); + } +} + LLPanelDisplay::LLPanelDisplay() { + mCommitCallbackRegistrar.add("Graphics.ResetTab", boost::bind(reset_all_to_default, boost::bind(&LLView::getChildView, this, _2, true, false))); LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_graphics1.xml"); } 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 5e017ec8f..04f20c2be 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 @@ -145,6 +145,9 @@ when the Atmospheric Shaders are enabled. + [RES_X] x [RES_Y]