diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-05-30 22:47:17 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-05-30 22:47:17 +0300 |
commit | 1dd6d3f43e465b29a9ed3a672db13db4f6654435 (patch) | |
tree | dbc26cdf93b26f3c8af377ec3ee14f55aa85d66a /indra/newview/llfloaterregioninfo.cpp | |
parent | 3a8521c38b17adb9d3006be0d7a23f94da7bcaea (diff) |
STORM-1256 WIP Grey out Apply/Cancel buttons when no local change made.
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 90b6ba0a43..2778671e24 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3342,6 +3342,8 @@ void LLPanelEnvironmentInfo::refresh() mDayCycleSettingsRadioGroup->setSelectedIndex(use_fixed_sky ? 0 : 1); setControlsEnabled(mEnableEditing); + + setDirty(false); } void LLPanelEnvironmentInfo::setControlsEnabled(bool enabled) @@ -3384,6 +3386,12 @@ void LLPanelEnvironmentInfo::setApplyProgress(bool started) } } +void LLPanelEnvironmentInfo::setDirty(bool dirty) +{ + getChildView("apply_btn")->setEnabled(dirty); + getChildView("cancel_btn")->setEnabled(dirty); +} + void LLPanelEnvironmentInfo::populateWaterPresetsList() { mWaterPresetCombo->removeall(); @@ -3558,6 +3566,8 @@ void LLPanelEnvironmentInfo::onSwitchRegionSettings() onSelectWaterPreset(); onSwitchDayCycle(); } + + setDirty(true); } void LLPanelEnvironmentInfo::onSwitchDayCycle() @@ -3575,6 +3585,8 @@ void LLPanelEnvironmentInfo::onSwitchDayCycle() { onSelectDayCycle(); } + + setDirty(true); } void LLPanelEnvironmentInfo::onSelectWaterPreset() @@ -3585,6 +3597,8 @@ void LLPanelEnvironmentInfo::onSelectWaterPreset() { LLEnvManagerNew::instance().useWaterParams(water_params); } + + setDirty(true); } void LLPanelEnvironmentInfo::onSelectSkyPreset() @@ -3596,6 +3610,8 @@ void LLPanelEnvironmentInfo::onSelectSkyPreset() { LLEnvManagerNew::instance().useSkyParams(params); } + + setDirty(true); } void LLPanelEnvironmentInfo::onSelectDayCycle() @@ -3608,6 +3624,8 @@ void LLPanelEnvironmentInfo::onSelectDayCycle() { LLEnvManagerNew::instance().useDayCycleParams(day_cycle, (LLEnvKey::EScope) scope); } + + setDirty(true); } void LLPanelEnvironmentInfo::onBtnApply() |