diff options
| author | Todd Stinson <stinson@lindenlab.com> | 2012-06-25 14:44:09 -0700 | 
|---|---|---|
| committer | Todd Stinson <stinson@lindenlab.com> | 2012-06-25 14:44:09 -0700 | 
| commit | 9b46e116a92ee4d005ae3e1d66a4fbaa270770ec (patch) | |
| tree | f54d83cad8b769d1d3076e658d0af1861cd22efb | |
| parent | bf1c1947d752e1f4d18d77b3190691d8244bc91f (diff) | |
PATH-743: Small code refactoring for clean-up.
| -rw-r--r-- | indra/newview/llpathfindingpathtool.cpp | 36 | 
1 files changed, 6 insertions, 30 deletions
| diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index fde2257777..6cf90addab 100644 --- a/indra/newview/llpathfindingpathtool.cpp +++ b/indra/newview/llpathfindingpathtool.cpp @@ -70,14 +70,9 @@ BOOL LLPathfindingPathTool::handleMouseDown(S32 pX, S32 pY, MASK pMask)  	{  		if (isAnyPathToolModKeys(pMask))  		{ -			if (isPointAModKeys(pMask)) -			{ -				gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD); -			} -			else if (isPointBModKeys(pMask)) -			{ -				gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD); -			} +			gViewerWindow->setCursor(isPointAModKeys(pMask) +				? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD +				: UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD);  			computeFinalPoints(pX, pY, pMask);  			mIsLeftMouseButtonHeld = true;  			setMouseCapture(TRUE); @@ -167,28 +162,9 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask)  	if (!mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask))  	{ -		if (isPointAModKeys(pMask)) -		{ -			if (mIsLeftMouseButtonHeld) -			{ -				gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD); -			} -			else -			{ -				gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START); -			} -		} -		else if (isPointBModKeys(pMask)) -		{ -			if (mIsLeftMouseButtonHeld) -			{ -				gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD); -			} -			else -			{ -				gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END); -			} -		} +		gViewerWindow->setCursor(isPointAModKeys(pMask) +			? (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_START) +			: (mIsLeftMouseButtonHeld ? UI_CURSOR_TOOLPATHFINDING_PATH_END_ADD : UI_CURSOR_TOOLPATHFINDING_PATH_END));  		computeTempPoints(pX, pY, pMask);  		returnVal = TRUE;  	} | 
