diff options
| author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-31 18:24:01 +0300 |
|---|---|---|
| committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-31 18:24:01 +0300 |
| commit | 79fb8e2ec26dc2c5a42ef1ee48ebaaa39183c67b (patch) | |
| tree | 2747ceb9c211f677be9a595ba91b75e71506c529 /indra/newview/llfloaterdaycycle.cpp | |
| parent | 5476999e9dfeca48009b43e4fcc0967be5540572 (diff) | |
STORM-1126 WIP Windlight Estate Settings integration: pass 4
Changes:
* Fixed incorrect way to pass parameters to notifications.
* Fixed crashes in the Advanced Sky floater and the Region Terrain panel.
* Fixed initialization and multiple instantiation of the Day Cycle floater
(that might lead to incorrect behavior).
* Fixed and re-enabled committing env. settings changes to region.
* Fixed day cycle and sky settings being sent as empty arrays and therefore not passing validation on server.
It is now possible to change region environment settings.
* Added debug messages.
Diffstat (limited to 'indra/newview/llfloaterdaycycle.cpp')
| -rw-r--r-- | indra/newview/llfloaterdaycycle.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp index 8979c7d6f7..c7132a96ab 100644 --- a/indra/newview/llfloaterdaycycle.cpp +++ b/indra/newview/llfloaterdaycycle.cpp @@ -48,6 +48,7 @@ #include "lllineeditor.h" #include "llwlanimator.h" #include "llnotifications.h" +#include "llnotificationsutil.h" #include "v4math.h" #include "llviewerdisplay.h" @@ -71,6 +72,11 @@ LLWLAnimator::ETime LLFloaterDayCycle::sPreviousTimeType = LLWLAnimator::TIME_LI LLFloaterDayCycle::LLFloaterDayCycle(const LLSD &key) : LLFloater(key) { +} + +// virtual +BOOL LLFloaterDayCycle::postBuild() +{ sOriginalTitle = getTitle(); // *HACK commented out since this code isn't released (yet) @@ -84,6 +90,8 @@ LLFloaterDayCycle::LLFloaterDayCycle(const LLSD &key) : LLFloater(key) // load it up initCallbacks(); + + return TRUE; } LLFloaterDayCycle::~LLFloaterDayCycle() @@ -173,6 +181,9 @@ void LLFloaterDayCycle::syncSliderTrack() sSliderToKey.clear(); // add sliders + + lldebugs << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << llendl; + std::map<F32, LLWLParamKey>::iterator mIt = LLWLParamManager::getInstance()->mDay.mTimeMap.begin(); for(; mIt != LLWLParamManager::getInstance()->mDay.mTimeMap.end(); mIt++) @@ -183,9 +194,12 @@ void LLFloaterDayCycle::syncSliderTrack() void LLFloaterDayCycle::syncTrack() { + lldebugs << "Syncing track (" << sSliderToKey.size() << ")" << llendl; + // if no keys, do nothing if(sSliderToKey.size() == 0) { + lldebugs << "No keys, not syncing" << llendl; return; } @@ -244,7 +258,9 @@ LLFloaterDayCycle* LLFloaterDayCycle::instance() { if (!sDayCycle) { - sDayCycle = new LLFloaterDayCycle("Day Cycle Floater"); + lldebugs << "Instantiating Day Cycle floater" << llendl; + sDayCycle = LLFloaterReg::getTypedInstance<LLFloaterDayCycle>("env_day_cycle"); + llassert(sDayCycle); // sDayCycle->open(); // sDayCycle->setFocus(TRUE); } @@ -294,7 +310,8 @@ void LLFloaterDayCycle::onClose(bool app_quitting) { if (sDayCycle) { - sDayCycle->setVisible(FALSE); + lldebugs << "Destorying Day Cycle floater" << llendl; + sDayCycle = NULL; } } @@ -548,7 +565,7 @@ void LLFloaterDayCycle::onAddKey(void* userData) LLSD args; args["SCOPE"] = LLEnvManager::getScopeString(sScope); args["MAX"] = max_sliders; - LLNotifications::instance().add("DayCycleTooManyKeyframes", LLSD(), args); + LLNotificationsUtil::add("DayCycleTooManyKeyframes", args); return; } |
