From 5ec8bbbe2244ea70d8aa74b5c572351632699425 Mon Sep 17 00:00:00 2001 From: Christian Goetze Date: Wed, 10 Oct 2007 00:01:43 +0000 Subject: svn merge -r71238:71367 svn+ssh://svn/svn/linden/branches/maint-ui-qa3 --- indra/newview/lltoolmgr.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltoolmgr.cpp') diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 7391a53036..ae74eba026 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -338,18 +338,21 @@ LLTool* LLToolMgr::getCurrentTool() cur_tool = mOverrideTool ? mOverrideTool : mBaseTool; } + LLTool* prev_tool = mSelectedTool; + // Set the selected tool to avoid infinite recursion + mSelectedTool = cur_tool; + //update tool selection status - if (mSelectedTool != cur_tool) + if (prev_tool != cur_tool) { - if (mSelectedTool) + if (prev_tool) { - mSelectedTool->handleDeselect(); + prev_tool->handleDeselect(); } if (cur_tool) { cur_tool->handleSelect(); } - mSelectedTool = cur_tool; } return mSelectedTool; -- cgit v1.2.3