diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-07-13 18:52:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 18:52:45 +0300 |
commit | 5ce4d42f55187e710fac64efbd34947900ef2d58 (patch) | |
tree | cd41da76403017aca3d58c10510ee7a13ac6e4ab /indra | |
parent | 880a1ee695f0d6b57c081c9a04d406712c17f058 (diff) |
SL-19993 Warn of automatic changes to Day Cycle when it's opened
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.h | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 6e8143384a..bb47feaa95 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -475,6 +475,8 @@ void LLFloaterEditExtDayCycle::refresh() void LLFloaterEditExtDayCycle::setEditSettingsAndUpdate(const LLSettingsBase::ptr_t &settings) { setEditDayCycle(std::dynamic_pointer_cast<LLSettingsDay>(settings)); + + showHDRNotification(std::dynamic_pointer_cast<LLSettingsDay>(settings)); } void LLFloaterEditExtDayCycle::setEditDayCycle(const LLSettingsDay::ptr_t &pday) @@ -1710,6 +1712,28 @@ void LLFloaterEditExtDayCycle::onPickerCommitSetting(LLUUID item_id, S32 track) } } +void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &pday) +{ + for (U32 i = LLSettingsDay::TRACK_GROUND_LEVEL; i <= LLSettingsDay::TRACK_MAX; i++) + { + LLSettingsDay::CycleTrack_t &day_track = pday->getCycleTrack(i); + + LLSettingsDay::CycleTrack_t::iterator iter = day_track.begin(); + LLSettingsDay::CycleTrack_t::iterator end = day_track.end(); + + while (iter != end) + { + LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second); + if (sky && sky->canAutoAdjust()) + { + LLNotificationsUtil::add("AutoAdjustHDRSky"); + return; + } + iter++; + } + } +} + void LLFloaterEditExtDayCycle::onAssetLoadedForInsertion(LLUUID item_id, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 source_track, S32 dest_track, LLSettingsBase::TrackPosition frame) { std::function<void()> cb = [this, settings, frame, source_track, dest_track]() diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h index ab5d12fa36..025a2ee5d1 100644 --- a/indra/newview/llfloatereditextdaycycle.h +++ b/indra/newview/llfloatereditextdaycycle.h @@ -188,6 +188,8 @@ private: bool isRemovingFrameAllowed(); bool isAddingFrameAllowed(); + void showHDRNotification(const LLSettingsDay::ptr_t &pday); + LLSettingsDay::ptr_t mEditDay; // edited copy LLSettingsDay::Seconds mDayLength; U32 mCurrentTrack; |