diff options
Diffstat (limited to 'indra')
-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; } |