diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-02 19:13:33 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-06-02 19:13:33 +0300 |
commit | bbc1283848e01bfd5284293d044eec53cde10d0e (patch) | |
tree | 8897c75f6fecda67caed5b18b16a1f7dce130e23 /indra/newview/llfloatereditdaycycle.cpp | |
parent | e184c7598680f2069e2bcf5caa3c86967d7ab0a1 (diff) |
STORM-1253 WIP Region sky presets are not accessible anymore when editing local day cycles.
Diffstat (limited to 'indra/newview/llfloatereditdaycycle.cpp')
-rw-r--r-- | indra/newview/llfloatereditdaycycle.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp index 52cfbb512a..36f71d6161 100644 --- a/indra/newview/llfloatereditdaycycle.cpp +++ b/indra/newview/llfloatereditdaycycle.cpp @@ -220,6 +220,10 @@ void LLFloaterEditDayCycle::applyTrack() void LLFloaterEditDayCycle::refreshSkyPresetsList() { + // Don't allow selecting region skies for a local day cycle, + // because thus we may end up with invalid day cycle. + bool include_region_skies = getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION; + mSkyPresetsCombo->removeall(); LLWLParamManager& sky_mgr = LLWLParamManager::instance(); @@ -231,6 +235,11 @@ void LLFloaterEditDayCycle::refreshSkyPresetsList() std::string item_title = key.name; if (key.scope == LLEnvKey::SCOPE_REGION) { + if (!include_region_skies) + { + continue; + } + item_title += " (" + getRegionName() + ")"; } @@ -689,6 +698,9 @@ void LLFloaterEditDayCycle::onDayCycleSelected() can_edit = canEditRegionSettings(); } + // We may need to add or remove region skies from the list. + refreshSkyPresetsList(); + F32 slider_time = mTimeSlider->getCurSliderValue() / sHoursPerDay; LLWLParamManager::instance().applyDayCycleParams(day_data, dc_key.scope, slider_time); loadTrack(); |