SL-19993 Warn of automatic changes to Day Cycle when it's opened
parent
880a1ee695
commit
5ce4d42f55
|
|
@ -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]()
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue