diff options
author | McCabe Maxsted | 2010-04-19 04:38:13 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-04-19 04:38:13 -0700 |
commit | 83aa99aa77ddbe69082c1b557787bcf029003775 (patch) | |
tree | 1bdfed4a2284428b8563b5b83285ec899ee6c9cf /linden/indra/newview | |
parent | Use metaverseink.com for non-SL web searches (diff) | |
download | meta-impy-83aa99aa77ddbe69082c1b557787bcf029003775.zip meta-impy-83aa99aa77ddbe69082c1b557787bcf029003775.tar.gz meta-impy-83aa99aa77ddbe69082c1b557787bcf029003775.tar.bz2 meta-impy-83aa99aa77ddbe69082c1b557787bcf029003775.tar.xz |
Applied slviewer-0-v12350-NumberOfDecimalsInTools.patch patch from the CV
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | linden/indra/newview/llfloatertools.cpp | 34 | ||||
-rw-r--r-- | linden/indra/newview/llfloatertools.h | 5 |
3 files changed, 46 insertions, 4 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 0fee2e0..6d5fc58 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -15,6 +15,17 @@ | |||
15 | <key>Value</key> | 15 | <key>Value</key> |
16 | <integer>1</integer> | 16 | <integer>1</integer> |
17 | </map> | 17 | </map> |
18 | <key>DecimalsForTools</key> | ||
19 | <map> | ||
20 | <key>Comment</key> | ||
21 | <string>Number of decimals for the edit tool position, size and rotation settings (0 to 5)</string> | ||
22 | <key>Persist</key> | ||
23 | <integer>1</integer> | ||
24 | <key>Type</key> | ||
25 | <string>U32</string> | ||
26 | <key>Value</key> | ||
27 | <integer>3</integer> | ||
28 | </map> | ||
18 | <key>DisableLoginLogoutScreens</key> | 29 | <key>DisableLoginLogoutScreens</key> |
19 | <map> | 30 | <map> |
20 | <key>Comment</key> | 31 | <key>Comment</key> |
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index 260872f..c145791 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2009, Linden Research, Inc. | 7 | * Copyright (c) 2002-2010, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -58,6 +58,7 @@ | |||
58 | #include "llresmgr.h" | 58 | #include "llresmgr.h" |
59 | #include "llselectmgr.h" | 59 | #include "llselectmgr.h" |
60 | #include "llslider.h" | 60 | #include "llslider.h" |
61 | #include "llspinctrl.h" | ||
61 | #include "llstatusbar.h" | 62 | #include "llstatusbar.h" |
62 | #include "lltabcontainer.h" | 63 | #include "lltabcontainer.h" |
63 | #include "lltextbox.h" | 64 | #include "lltextbox.h" |
@@ -178,6 +179,28 @@ void* LLFloaterTools::createPanelLandInfo(void* data) | |||
178 | return floater->mPanelLandInfo; | 179 | return floater->mPanelLandInfo; |
179 | } | 180 | } |
180 | 181 | ||
182 | void LLFloaterTools::toolsPrecision() | ||
183 | { | ||
184 | U32 decimals = gSavedSettings.getU32("DecimalsForTools"); | ||
185 | if (decimals != mPrecision) | ||
186 | { | ||
187 | if (decimals > 5) | ||
188 | { | ||
189 | decimals = 5; | ||
190 | } | ||
191 | getChild<LLSpinCtrl>("Pos X")->setPrecision(decimals); | ||
192 | getChild<LLSpinCtrl>("Pos Y")->setPrecision(decimals); | ||
193 | getChild<LLSpinCtrl>("Pos Z")->setPrecision(decimals); | ||
194 | getChild<LLSpinCtrl>("Scale X")->setPrecision(decimals); | ||
195 | getChild<LLSpinCtrl>("Scale Y")->setPrecision(decimals); | ||
196 | getChild<LLSpinCtrl>("Scale Z")->setPrecision(decimals); | ||
197 | getChild<LLSpinCtrl>("Rot X")->setPrecision(decimals); | ||
198 | getChild<LLSpinCtrl>("Rot Y")->setPrecision(decimals); | ||
199 | getChild<LLSpinCtrl>("Rot Z")->setPrecision(decimals); | ||
200 | mPrecision = decimals; | ||
201 | } | ||
202 | } | ||
203 | |||
181 | BOOL LLFloaterTools::postBuild() | 204 | BOOL LLFloaterTools::postBuild() |
182 | { | 205 | { |
183 | 206 | ||
@@ -245,6 +268,8 @@ BOOL LLFloaterTools::postBuild() | |||
245 | mBtnUnlink = getChild<LLButton>("unlink_btn"); | 268 | mBtnUnlink = getChild<LLButton>("unlink_btn"); |
246 | childSetAction("unlink_btn",onClickUnlink, this); | 269 | childSetAction("unlink_btn",onClickUnlink, this); |
247 | 270 | ||
271 | toolsPrecision(); | ||
272 | |||
248 | // | 273 | // |
249 | // Create Buttons | 274 | // Create Buttons |
250 | // | 275 | // |
@@ -418,7 +443,8 @@ LLFloaterTools::LLFloaterTools() | |||
418 | mPanelLandInfo(NULL), | 443 | mPanelLandInfo(NULL), |
419 | 444 | ||
420 | mTabLand(NULL), | 445 | mTabLand(NULL), |
421 | mDirty(TRUE) | 446 | mDirty(TRUE), |
447 | mPrecision(3) | ||
422 | { | 448 | { |
423 | setAutoFocus(FALSE); | 449 | setAutoFocus(FALSE); |
424 | LLCallbackMap::map_t factory_map; | 450 | LLCallbackMap::map_t factory_map; |
@@ -483,6 +509,8 @@ void LLFloaterTools::refresh() | |||
483 | LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); | 509 | LLResMgr::getInstance()->getIntegerString(prim_count_string, LLSelectMgr::getInstance()->getSelection()->getObjectCount()); |
484 | childSetTextArg("prim_count", "[COUNT]", prim_count_string); | 510 | childSetTextArg("prim_count", "[COUNT]", prim_count_string); |
485 | 511 | ||
512 | toolsPrecision(); | ||
513 | |||
486 | // Refresh child tabs | 514 | // Refresh child tabs |
487 | mPanelPermissions->refresh(); | 515 | mPanelPermissions->refresh(); |
488 | mPanelObject->refresh(); | 516 | mPanelObject->refresh(); |
@@ -864,7 +892,7 @@ void LLFloaterTools::onClose(bool app_quitting) | |||
864 | 892 | ||
865 | LLViewerJoystick::getInstance()->moveAvatar(false); | 893 | LLViewerJoystick::getInstance()->moveAvatar(false); |
866 | 894 | ||
867 | // Different from handle_reset_view in that it doesn't actually | 895 | // Different from handle_reset_view in that it doesn't actually |
868 | // move the camera if EditCameraMovement is not set. | 896 | // move the camera if EditCameraMovement is not set. |
869 | gAgent.resetView(gSavedSettings.getBOOL("EditCameraMovement")); | 897 | gAgent.resetView(gSavedSettings.getBOOL("EditCameraMovement")); |
870 | 898 | ||
diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h index 2bb3fb7..ba09bc8 100644 --- a/linden/indra/newview/llfloatertools.h +++ b/linden/indra/newview/llfloatertools.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2002&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2002-2009, Linden Research, Inc. | 7 | * Copyright (c) 2002-2010, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -79,6 +79,8 @@ public: | |||
79 | // button highlights, etc. | 79 | // button highlights, etc. |
80 | void updatePopup(LLCoordGL center, MASK mask); | 80 | void updatePopup(LLCoordGL center, MASK mask); |
81 | 81 | ||
82 | void toolsPrecision(); | ||
83 | |||
82 | // When the floater is going away, reset any options that need to be | 84 | // When the floater is going away, reset any options that need to be |
83 | // cleared. | 85 | // cleared. |
84 | void resetToolState(); | 86 | void resetToolState(); |
@@ -197,6 +199,7 @@ public: | |||
197 | 199 | ||
198 | private: | 200 | private: |
199 | BOOL mDirty; | 201 | BOOL mDirty; |
202 | U32 mPrecision; | ||
200 | 203 | ||
201 | std::map<std::string, std::string> mStatusText; | 204 | std::map<std::string, std::string> mStatusText; |
202 | 205 | ||