aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewercontrol.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llviewercontrol.cpp
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/llviewercontrol.cpp')
-rw-r--r--linden/indra/newview/llviewercontrol.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index 86e58d1..e1aa3ae 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -105,7 +105,7 @@ BOOL LLFloaterSettingsDebug::postBuild()
105 childSetUserData("boolean_combo", this); 105 childSetUserData("boolean_combo", this);
106 childSetCommitCallback("color_swatch", onCommitSettings); 106 childSetCommitCallback("color_swatch", onCommitSettings);
107 childSetUserData("color_swatch", this); 107 childSetUserData("color_swatch", this);
108 108 childSetAction("default_btn", onClickDefault, this);
109 mComment = (LLTextEditor*)getChildByName("comment_text"); 109 mComment = (LLTextEditor*)getChildByName("comment_text");
110 return TRUE; 110 return TRUE;
111} 111}
@@ -129,7 +129,7 @@ void LLFloaterSettingsDebug::show(void*)
129 gUICtrlFactory->buildFloater(sInstance, "floater_settings_debug.xml"); 129 gUICtrlFactory->buildFloater(sInstance, "floater_settings_debug.xml");
130 } 130 }
131 131
132 sInstance->open(); 132 sInstance->open(); /* Flawfinder: ignore */
133} 133}
134 134
135//static 135//static
@@ -217,6 +217,20 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data)
217 } 217 }
218} 218}
219 219
220// static
221void LLFloaterSettingsDebug::onClickDefault(void* user_data)
222{
223 LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data;
224 LLComboBox* settings_combo = (LLComboBox*)floaterp->getChildByName("settings_combo");
225 LLControlBase* controlp = (LLControlBase*)settings_combo->getCurrentUserdata();
226
227 if (controlp)
228 {
229 controlp->resetToDefault();
230 floaterp->updateControl(controlp);
231 }
232}
233
220// we've switched controls, or doing per-frame update, so update spinners, etc. 234// we've switched controls, or doing per-frame update, so update spinners, etc.
221void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp) 235void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
222{ 236{
@@ -440,6 +454,8 @@ void LLFloaterSettingsDebug::updateControl(LLControlBase* controlp)
440 if (!spinner4->hasFocus()) 454 if (!spinner4->hasFocus())
441 { 455 {
442 spinner4->setPrecision(3); 456 spinner4->setPrecision(3);
457 spinner4->setMinValue(0.0);
458 spinner4->setMaxValue(1.f);
443 spinner4->setValue(clr.mV[VALPHA]); 459 spinner4->setValue(clr.mV[VALPHA]);
444 } 460 }
445 break; 461 break;