summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-05-31 23:03:59 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-05-31 23:03:59 +0300
commit6d4198b89a3edf28e208391bbdde90a7a000d936 (patch)
treedb206d281516fbd5e64c3757685606b7de91cf41 /indra/newview
parent5db9e5551b9e2cc0ab6f61c643141299db859603 (diff)
STORM-1244 WIP Fixed modifying user preferences when the Environment Settings floater is opened.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterenvironmentsettings.cpp7
-rw-r--r--indra/newview/llfloaterregioninfo.cpp1
2 files changed, 5 insertions, 3 deletions
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<LLView>("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<LLButton>("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));