From c8a0aa99b4b879c4e22307a679053d4bd61dd9ff Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 18 Feb 2015 16:48:23 -0500 Subject: STORM-2082 Fix issue with isDirty --- indra/newview/llfloaterpreference.cpp | 62 +++++++++++------------------------ 1 file changed, 20 insertions(+), 42 deletions(-) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index d2dfb63f9d..4b45837ec0 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1172,7 +1172,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() { LLComboBox* ctrl_reflections = getChild("Reflections"); LLTextBox* reflections_text = getChild("ReflectionsText"); - + // Reflections BOOL reflections = gSavedSettings.getBOOL("VertexShaderEnable") && gGLManager.mHasCubeMap @@ -1213,9 +1213,9 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() // Vertex Shaders // Global Shader Enable LLCheckBoxCtrl* ctrl_shader_enable = getChild("BasicShaders"); - LLSliderCtrl* terrain_detail = getChild("TerrainDetail"); // can be linked with control var + LLSliderCtrl* terrain_detail = getChild("TerrainDetail"); // can be linked with control var LLTextBox* terrain_text = getChild("TerrainDetailText"); - + ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable")); BOOL shaders = ctrl_shader_enable->get(); @@ -1305,36 +1305,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState() getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("antialiasing restart")->setVisible(!LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred")); - /* Disabling this block of code because canUseAntiAliasing currently always returns true - // anti-aliasing - LLComboBox* fsaa_ctrl = getChild("fsaa"); - LLTextBox* fsaa_text = getChild("antialiasing label"); - LLTextBox* fsaa_restart = getChild("antialiasing restart"); - - // Enable or disable the control, the "Antialiasing:" label and the restart warning - // based on code support for the feature on the current hardware. - - if (gPipeline.canUseAntiAliasing()) - { - fsaa_ctrl->setEnabled(TRUE); - - LLColor4 color = LLUIColorTable::instance().getColor("LabelTextColor"); - fsaa_text->setColor(color); - - fsaa_restart->setVisible(!gSavedSettings.getBOOL("RenderDeferred")); - } - else - { - fsaa_ctrl->setEnabled(FALSE); - fsaa_ctrl->setValue((LLSD::Integer) 0); - - LLColor4 color = LLUIColorTable::instance().getColor("LabelDisabledColor"); - fsaa_text->setColor(color); - - fsaa_restart->setVisible(FALSE); - } - */ - // now turn off any features that are unavailable disableUnavailableSettings(); @@ -1506,12 +1476,11 @@ void LLFloaterPreference::refresh() { LLPanel::refresh(); refreshEnabledState(); -} - -void LLFloaterPreferenceGraphicsAdvanced::draw() -{ - refresh(); - LLFloater::draw(); + LLFloater* advanced = LLFloaterReg::findTypedInstance("prefs_graphics_advanced"); + if (advanced) + { + advanced->refresh(); + } } void LLFloaterPreferenceGraphicsAdvanced::refresh() @@ -2182,7 +2151,10 @@ void LLPanelPreference::saveSettings() mSavedValues.clear(); std::list view_stack; view_stack.push_back(this); - view_stack.push_back(advanced); + if (advanced) + { + view_stack.push_back(advanced); + } while(!view_stack.empty()) { // Process view on top of the stack @@ -2410,7 +2382,10 @@ bool LLPanelPreferenceGraphics::hasDirtyChilds() LLFloater* advanced = LLFloaterReg::findTypedInstance("prefs_graphics_advanced"); std::list view_stack; view_stack.push_back(this); - view_stack.push_back(advanced); + if (advanced) + { + view_stack.push_back(advanced); + } while(!view_stack.empty()) { // Process view on top of the stack @@ -2449,7 +2424,10 @@ void LLPanelPreferenceGraphics::resetDirtyChilds() LLFloater* advanced = LLFloaterReg::findTypedInstance("prefs_graphics_advanced"); std::list view_stack; view_stack.push_back(this); - view_stack.push_back(advanced); + if (advanced) + { + view_stack.push_back(advanced); + } while(!view_stack.empty()) { // Process view on top of the stack -- cgit v1.2.3