From 6d4198b89a3edf28e208391bbdde90a7a000d936 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Tue, 31 May 2011 23:03:59 +0300 Subject: STORM-1244 WIP Fixed modifying user preferences when the Environment Settings floater is opened. --- indra/newview/llfloaterenvironmentsettings.cpp | 7 ++++--- indra/newview/llfloaterregioninfo.cpp | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp index 49f0161bdd..35163d6230 100644 --- a/indra/newview/llfloaterenvironmentsettings.cpp +++ b/indra/newview/llfloaterenvironmentsettings.cpp @@ -96,9 +96,10 @@ void LLFloaterEnvironmentSettings::onOpen(const LLSD& key) populateSkyPresetsList(); populateDayCyclePresetsList(); - // Update other controls state based on the selected radio buttons. - onSwitchRegionSettings(); - onSwitchDayCycle(); + // Enable/disable other controls based on user preferences. + getChild("user_environment_settings")->setEnabled(!mUseRegionSettings); + mSkyPresetCombo->setEnabled(mUseFixedSky); + mDayCyclePresetCombo->setEnabled(!mUseFixedSky); // Save water, sky and day cycle presets to restore them // in case of "Cancel" button has been pressed. diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 39ed2534b2..414695d40f 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3287,6 +3287,7 @@ BOOL LLPanelEnvironmentInfo::postBuild() mDayCyclePresetCombo->setCommitCallback(boost::bind(&LLPanelEnvironmentInfo::onSelectDayCycle, this)); childSetCommitCallback("apply_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnApply, this), NULL); + getChild("apply_btn")->setRightMouseDownCallback(boost::bind(&LLEnvManagerNew::dumpUserPrefs, LLEnvManagerNew::getInstance())); childSetCommitCallback("cancel_btn", boost::bind(&LLPanelEnvironmentInfo::onBtnCancel, this), NULL); LLEnvManagerNew::instance().setRegionSettingsChangeCallback(boost::bind(&LLPanelEnvironmentInfo::onRegionSettingschange, this)); -- cgit v1.2.3