diff options
Diffstat (limited to 'linden/indra/newview/llfloatertools.cpp')
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index efd81a6..4f31c3c 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -179,7 +179,27 @@ void* LLFloaterTools::createPanelLandInfo(void* data) | |||
179 | return floater->mPanelLandInfo; | 179 | return floater->mPanelLandInfo; |
180 | } | 180 | } |
181 | 181 | ||
182 | void LLFloaterTools::toolsPrecision() | 182 | void LLFloaterTools::updateToolsSizeLimits() |
183 | { | ||
184 | if (gSavedSettings.getBOOL("DisableMaxBuildConstraints")) | ||
185 | { | ||
186 | getChild<LLSpinCtrl>("Scale X")->setMaxValue(F32_MAX); | ||
187 | getChild<LLSpinCtrl>("Scale Y")->setMaxValue(F32_MAX); | ||
188 | getChild<LLSpinCtrl>("Scale Z")->setMaxValue(F32_MAX); | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | getChild<LLSpinCtrl>("Scale X")->setMaxValue(gHippoLimits->getMaxPrimScale()); | ||
193 | getChild<LLSpinCtrl>("Scale Y")->setMaxValue(gHippoLimits->getMaxPrimScale()); | ||
194 | getChild<LLSpinCtrl>("Scale Z")->setMaxValue(gHippoLimits->getMaxPrimScale()); | ||
195 | |||
196 | getChild<LLSpinCtrl>("Scale X")->setMinValue(gHippoLimits->getMinPrimScale()); | ||
197 | getChild<LLSpinCtrl>("Scale Y")->setMinValue(gHippoLimits->getMinPrimScale()); | ||
198 | getChild<LLSpinCtrl>("Scale Z")->setMinValue(gHippoLimits->getMinPrimScale()); | ||
199 | } | ||
200 | } | ||
201 | |||
202 | void LLFloaterTools::updateToolsPrecision() | ||
183 | { | 203 | { |
184 | U32 decimals = gSavedSettings.getU32("DecimalsForTools"); | 204 | U32 decimals = gSavedSettings.getU32("DecimalsForTools"); |
185 | if (decimals != mPrecision) | 205 | if (decimals != mPrecision) |
@@ -268,15 +288,11 @@ BOOL LLFloaterTools::postBuild() | |||
268 | mBtnUnlink = getChild<LLButton>("unlink_btn"); | 288 | mBtnUnlink = getChild<LLButton>("unlink_btn"); |
269 | childSetAction("unlink_btn",onClickUnlink, this); | 289 | childSetAction("unlink_btn",onClickUnlink, this); |
270 | 290 | ||
271 | getChild<LLSpinCtrl>("Scale X")->setMaxValue(gHippoLimits->getMaxPrimScale()); | 291 | // Set the default size limits for spinners -- MC |
272 | getChild<LLSpinCtrl>("Scale Y")->setMaxValue(gHippoLimits->getMaxPrimScale()); | 292 | updateToolsSizeLimits(); |
273 | getChild<LLSpinCtrl>("Scale Z")->setMaxValue(gHippoLimits->getMaxPrimScale()); | ||
274 | |||
275 | getChild<LLSpinCtrl>("Scale X")->setMinValue(gHippoLimits->getMinPrimScale()); | ||
276 | getChild<LLSpinCtrl>("Scale Y")->setMinValue(gHippoLimits->getMinPrimScale()); | ||
277 | getChild<LLSpinCtrl>("Scale Z")->setMinValue(gHippoLimits->getMinPrimScale()); | ||
278 | 293 | ||
279 | toolsPrecision(); | 294 | // Set the default decimal precision for spinners -- MC |
295 | updateToolsPrecision(); | ||
280 | 296 | ||
281 | // | 297 | // |
282 | // Create Buttons | 298 | // Create Buttons |
@@ -517,7 +533,7 @@ void LLFloaterTools::refresh() | |||
517 | LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); | 533 | LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); |
518 | childSetTextArg("prim_count", "[COUNT]", prim_count_string); | 534 | childSetTextArg("prim_count", "[COUNT]", prim_count_string); |
519 | 535 | ||
520 | toolsPrecision(); | 536 | updateToolsPrecision(); |
521 | 537 | ||
522 | // Refresh child tabs | 538 | // Refresh child tabs |
523 | mPanelPermissions->refresh(); | 539 | mPanelPermissions->refresh(); |