diff options
author | maxim_productengine <mnikolenko@productengine.com> | 2019-05-28 18:06:08 +0300 |
---|---|---|
committer | maxim_productengine <mnikolenko@productengine.com> | 2019-05-28 18:06:08 +0300 |
commit | fdf0d49614b820ffa85d2aa9258e4592bc0e45f3 (patch) | |
tree | 4b99bbed2cbb9e9dd2acced4e4c889090e37c9ac /indra/newview/llenvironment.cpp | |
parent | 9f2fc2b433f1c67b85786467ab17ff0b662b90f7 (diff) |
SL-11279 [EEP] Automatically toggle the beacon checkboxes
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r-- | indra/newview/llenvironment.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 57e6ab7159..a67ba709b0 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -811,7 +811,10 @@ LLEnvironment::LLEnvironment(): mSelectedWater(), mSelectedDay(), mSelectedEnvironment(LLEnvironment::ENV_LOCAL), - mCurrentTrack(1) + mCurrentTrack(1), + mEditorCounter(0), + mShowSunBeacon(false), + mShowMoonBeacon(false) { } @@ -2692,6 +2695,25 @@ void LLEnvironment::DayTransition::animate() }); } +void LLEnvironment::saveBeaconsState() +{ + if (mEditorCounter == 0) + { + mShowSunBeacon = gSavedSettings.getBOOL("sunbeacon"); + mShowMoonBeacon = gSavedSettings.getBOOL("moonbeacon"); + } + ++mEditorCounter; +} +void LLEnvironment::revertBeaconsState() +{ + --mEditorCounter; + if (mEditorCounter == 0) + { + gSavedSettings.setBOOL("sunbeacon", mShowSunBeacon && gSavedSettings.getBOOL("sunbeacon")); + gSavedSettings.setBOOL("moonbeacon", mShowMoonBeacon && gSavedSettings.getBOOL("moonbeacon")); + } +} + //========================================================================= LLTrackBlenderLoopingManual::LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno) : LLSettingsBlender(target, LLSettingsBase::ptr_t(), LLSettingsBase::ptr_t()), |