aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt8
-rw-r--r--linden/indra/newview/llfloaterwindlight.cpp8
-rw-r--r--linden/indra/newview/llwindlightremotectrl.cpp9
-rw-r--r--linden/indra/newview/llwlparammanager.cpp6
-rw-r--r--linden/indra/newview/llwlparammanager.h3
5 files changed, 29 insertions, 5 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 438f5b4..acd81e1 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -4,6 +4,14 @@
4 4
5 modified: linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml 5 modified: linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml
6 6
7
8 * Fixed windlight toolbar not updating windlight floater pulldown.
9
10 modified: linden/indra/newview/llfloaterwindlight.cpp
11 modified: linden/indra/newview/llwindlightremotectrl.cpp
12 modified: linden/indra/newview/llwlparammanager.cpp
13 modified: linden/indra/newview/llwlparammanager.h
14
7 15
82009-09-11 McCabe Maxsted <hakushakukun@gmail.com> 162009-09-11 McCabe Maxsted <hakushakukun@gmail.com>
9 17
diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp
index 43e8e1e..1c3db9b 100644
--- a/linden/indra/newview/llfloaterwindlight.cpp
+++ b/linden/indra/newview/llfloaterwindlight.cpp
@@ -439,6 +439,14 @@ void LLFloaterWindLight::syncMenu()
439 childSetValue("WLGamma", param_mgr->mWLGamma.x); 439 childSetValue("WLGamma", param_mgr->mWLGamma.x);
440 440
441 childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness()); 441 childSetValue("WLStarAlpha", param_mgr->mCurParams.getStarBrightness());
442
443 // Update combobox name
444 LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo");
445 std::string current_name = param_mgr->mCurPresetName;
446 if (!current_name.empty() && current_name != comboBox->getSelectedValue().asString())
447 {
448 comboBox->selectByValue(LLSD(current_name));
449 }
442} 450}
443 451
444 452
diff --git a/linden/indra/newview/llwindlightremotectrl.cpp b/linden/indra/newview/llwindlightremotectrl.cpp
index e47eef7..d6074b1 100644
--- a/linden/indra/newview/llwindlightremotectrl.cpp
+++ b/linden/indra/newview/llwindlightremotectrl.cpp
@@ -127,9 +127,10 @@ void LLWindlightRemoteCtrl::refreshPresets()
127{ 127{
128 if (mPresetsCombo) 128 if (mPresetsCombo)
129 { 129 {
130 //store current preset 130 // snag current preset
131 std::string cur_preset = mPresetsCombo->getValue().asString(); 131 std::string cur_preset = LLWLParamManager::instance()->mCurPresetName;//mPresetsCombo->getValue().asString();
132 132
133 // clear in case presets names have changed
133 mPresetsCombo->clearRows(); 134 mPresetsCombo->clearRows();
134 135
135 std::map<std::string, LLWLParamSet>::iterator mIt = 136 std::map<std::string, LLWLParamSet>::iterator mIt =
@@ -139,7 +140,7 @@ void LLWindlightRemoteCtrl::refreshPresets()
139 mPresetsCombo->add(mIt->first); 140 mPresetsCombo->add(mIt->first);
140 } 141 }
141 142
142 // Insert label after sorting, at top, with separator below it 143 // insert separator and add World menu options
143 mPresetsCombo->addSeparator(ADD_BOTTOM); 144 mPresetsCombo->addSeparator(ADD_BOTTOM);
144 mPresetsCombo->addSimpleElement(getString("sunrise"), ADD_BOTTOM); 145 mPresetsCombo->addSimpleElement(getString("sunrise"), ADD_BOTTOM);
145 mPresetsCombo->addSimpleElement(getString("noon"), ADD_BOTTOM); 146 mPresetsCombo->addSimpleElement(getString("noon"), ADD_BOTTOM);
@@ -148,7 +149,7 @@ void LLWindlightRemoteCtrl::refreshPresets()
148 mPresetsCombo->addSimpleElement(getString("revert_region"), ADD_BOTTOM); 149 mPresetsCombo->addSimpleElement(getString("revert_region"), ADD_BOTTOM);
149 150
150 if (!cur_preset.empty()) 151 if (!cur_preset.empty())
151 { 152 {
152 mPresetsCombo->selectByValue(LLSD(cur_preset)); 153 mPresetsCombo->selectByValue(LLSD(cur_preset));
153 } 154 }
154 else 155 else
diff --git a/linden/indra/newview/llwlparammanager.cpp b/linden/indra/newview/llwlparammanager.cpp
index ba3d070..ba21a96 100644
--- a/linden/indra/newview/llwlparammanager.cpp
+++ b/linden/indra/newview/llwlparammanager.cpp
@@ -97,7 +97,10 @@ LLWLParamManager::LLWLParamManager() :
97 97
98 // sky dome 98 // sky dome
99 mDomeOffset(0.96f), 99 mDomeOffset(0.96f),
100 mDomeRadius(15000.f) 100 mDomeRadius(15000.f),
101
102 // current name
103 mCurPresetName("")
101{ 104{
102} 105}
103 106
@@ -226,6 +229,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate)
226 setParamSet(name, paramsData); 229 setParamSet(name, paramsData);
227 } 230 }
228 presetsXML.close(); 231 presetsXML.close();
232 mCurPresetName = name;
229 } 233 }
230 else 234 else
231 { 235 {
diff --git a/linden/indra/newview/llwlparammanager.h b/linden/indra/newview/llwlparammanager.h
index 9895e91..4507307 100644
--- a/linden/indra/newview/llwlparammanager.h
+++ b/linden/indra/newview/llwlparammanager.h
@@ -262,6 +262,9 @@ public:
262 262
263 // list of all the parameters, listed by name 263 // list of all the parameters, listed by name
264 std::map<std::string, LLWLParamSet> mParamList; 264 std::map<std::string, LLWLParamSet> mParamList;
265
266 // current parameter name
267 std::string mCurPresetName;
265 268
266 269
267private: 270private: