diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-05-04 17:16:12 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-05-04 17:16:12 -0400 |
commit | a4467e9ffe9dc378451d7bb6b8c70f6c0c42a814 (patch) | |
tree | c6a918a0a3a0d7e1117ca71bfc966e3d6cd4b5ea /indra/newview/lltoolpie.cpp | |
parent | 1f2fcc12980dd21659bce493431b7a1b3fe2ef00 (diff) | |
parent | 07ec10781e45b3d92e27e92ddad39cf74fa7ff0b (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer64-c-11
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r-- | indra/newview/lltoolpie.cpp | 86 |
1 files changed, 38 insertions, 48 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e17651dc91..fc052ae3aa 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -338,56 +338,41 @@ BOOL LLToolPie::handleLeftClickPick() // If left-click never selects or spawns a menu // Eat the event. - if (!gSavedSettings.getBOOL("LeftClickShowMenu")) + + // mouse already released + if (!mMouseButtonDown) { - // mouse already released - if (!mMouseButtonDown) - { - return true; - } + return true; + } - while( object && object->isAttachment() && !object->flagHandleTouch()) + while (object && object->isAttachment() && !object->flagHandleTouch()) + { + // don't pick avatar through hud attachment + if (object->isHUDAttachment()) { - // don't pick avatar through hud attachment - if (object->isHUDAttachment()) - { - break; - } - object = (LLViewerObject*)object->getParent(); + break; } - if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk")) - { - // we left clicked on avatar, switch to focus mode - mMouseButtonDown = false; - LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); - gViewerWindow->hideCursor(); - LLToolCamera::getInstance()->setMouseCapture(TRUE); - LLToolCamera::getInstance()->pickCallback(mPick); - gAgentCamera.setFocusOnAvatar(TRUE, TRUE); + object = (LLViewerObject*)object->getParent(); + } + if (object && object == gAgentAvatarp && !gSavedSettings.getBOOL("ClickToWalk")) + { + // we left clicked on avatar, switch to focus mode + mMouseButtonDown = false; + LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); + gViewerWindow->hideCursor(); + LLToolCamera::getInstance()->setMouseCapture(TRUE); + LLToolCamera::getInstance()->pickCallback(mPick); + gAgentCamera.setFocusOnAvatar(TRUE, TRUE); - return TRUE; - } + return TRUE; + } ////////// // // Could be first left-click on nothing // LLFirstUse::useLeftClickNoHit(); ///////// - - // Eat the event - return LLTool::handleMouseDown(x, y, mask); - } - if (gAgent.leftButtonGrabbed()) - { - // if the left button is grabbed, don't put up the pie menu - return LLTool::handleMouseDown(x, y, mask); - } - - // Can't ignore children here. - LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); - - // Spawn pie menu - LLTool::handleRightMouseDown(x, y, mask); - return TRUE; + // Eat the event + return LLTool::handleMouseDown(x, y, mask); } BOOL LLToolPie::useClickAction(MASK mask, @@ -908,14 +893,19 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) line.append(LLTrans::getString("RetrievingData")); } } - else if(gCacheName->getFullName(owner, name)) - { - line.append(name); - } - else - { - line.append(LLTrans::getString("RetrievingData")); - } + else + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(owner, &av_name)) + { + name = av_name.getUserName(); + line.append(name); + } + else + { + line.append(LLTrans::getString("RetrievingData")); + } + } } else { |