diff options
author | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:11 -0500 |
commit | 215f423cbe18fe9ca14a26caef918d303bad28ff (patch) | |
tree | 0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/lltoolmgr.cpp | |
parent | Second Life viewer sources 1.18.3.5-RC (diff) | |
download | meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2 meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz |
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lltoolmgr.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/linden/indra/newview/lltoolmgr.cpp b/linden/indra/newview/lltoolmgr.cpp index 8ce8111..ae74eba 100644 --- a/linden/indra/newview/lltoolmgr.cpp +++ b/linden/indra/newview/lltoolmgr.cpp | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file lltoolmgr.cpp | 2 | * @file lltoolmgr.cpp |
3 | * @brief LLToolMgr class implementation | 3 | * @brief LLToolMgr class implementation |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
@@ -335,18 +338,21 @@ LLTool* LLToolMgr::getCurrentTool() | |||
335 | cur_tool = mOverrideTool ? mOverrideTool : mBaseTool; | 338 | cur_tool = mOverrideTool ? mOverrideTool : mBaseTool; |
336 | } | 339 | } |
337 | 340 | ||
341 | LLTool* prev_tool = mSelectedTool; | ||
342 | // Set the selected tool to avoid infinite recursion | ||
343 | mSelectedTool = cur_tool; | ||
344 | |||
338 | //update tool selection status | 345 | //update tool selection status |
339 | if (mSelectedTool != cur_tool) | 346 | if (prev_tool != cur_tool) |
340 | { | 347 | { |
341 | if (mSelectedTool) | 348 | if (prev_tool) |
342 | { | 349 | { |
343 | mSelectedTool->handleDeselect(); | 350 | prev_tool->handleDeselect(); |
344 | } | 351 | } |
345 | if (cur_tool) | 352 | if (cur_tool) |
346 | { | 353 | { |
347 | cur_tool->handleSelect(); | 354 | cur_tool->handleSelect(); |
348 | } | 355 | } |
349 | mSelectedTool = cur_tool; | ||
350 | } | 356 | } |
351 | 357 | ||
352 | return mSelectedTool; | 358 | return mSelectedTool; |