aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwindlightremotectrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llwindlightremotectrl.cpp')
-rw-r--r--linden/indra/newview/llwindlightremotectrl.cpp9
1 files changed, 5 insertions, 4 deletions
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