diff options
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llfloaterregioninfo.h | 1 |
2 files changed, 19 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() diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 324b3fb157..6075842e76 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -448,6 +448,7 @@ private: void refresh(); void setControlsEnabled(bool enabled); void setApplyProgress(bool started); + void setDirty(bool dirty); void populateWaterPresetsList(); void populateSkyPresetsList(); |