diff options
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
| -rw-r--r-- | indra/newview/lltoolmgr.cpp | 11 | 
1 files changed, 7 insertions, 4 deletions
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;  | 
