diff options
author | Oz Linden <oz@lindenlab.com> | 2012-06-26 13:28:19 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-06-26 13:28:19 -0400 |
commit | ec730b66004bf9120bb5ee3eba59f0253a78d364 (patch) | |
tree | 38f9a2eb0a8b5915b147aa2e92ea5488c9541fdd /indra/newview/llpathfindingpathtool.cpp | |
parent | 5c2c85c6f7f7552a184169bc5959a84efac05895 (diff) | |
parent | b3ccf0f2adb666d558cddd3cad1e548a99ea401f (diff) |
merge to latest viewer-development-havokai
Diffstat (limited to 'indra/newview/llpathfindingpathtool.cpp')
-rw-r--r-- | indra/newview/llpathfindingpathtool.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/indra/newview/llpathfindingpathtool.cpp b/indra/newview/llpathfindingpathtool.cpp index 82426920d8..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); - } - else if (isPointBModKeys(pMask)) - { - gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_END); - } + 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,14 +162,9 @@ BOOL LLPathfindingPathTool::handleHover(S32 pX, S32 pY, MASK pMask) if (!mIsMiddleMouseButtonHeld && !mIsRightMouseButtonHeld && isAnyPathToolModKeys(pMask)) { - if (isPointAModKeys(pMask)) - { - gViewerWindow->setCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START); - } - else if (isPointBModKeys(pMask)) - { - 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; } |