summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-26 22:28:18 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-23 14:48:03 +0300
commit2532a2ee9ee9003e2c6b72f8da19979a9e3dd2f6 (patch)
tree73205ed8bedfc5855082205ee5334d7e06f45d80 /indra/newview/lltoolpie.cpp
parent4ae2165c4516a74012d30610b4c53de6d3ccaf90 (diff)
SL-6109 Conflict resolution
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 35b4306e1d..1b54402221 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -537,13 +537,13 @@ void LLToolPie::resetSelection()
mClickAction = 0;
}
-void LLToolPie::walkToClickedLocation()
+bool LLToolPie::walkToClickedLocation()
{
if (gAgent.getFlying() // don't auto-navigate while flying until that works
|| !gAgentAvatarp
|| gAgentAvatarp->isSitting())
{
- return;
+ return false;
}
LLPickInfo saved_pick = mPick;
@@ -557,7 +557,7 @@ void LLToolPie::walkToClickedLocation()
if (mPick.getObject() && mPick.getObject()->isHUDAttachment())
{
mPick = saved_pick;
- return;
+ return false;
}
}
@@ -592,6 +592,7 @@ void LLToolPie::walkToClickedLocation()
gAgent.startAutoPilotGlobal(pos, std::string(), NULL, NULL, NULL, 0.f, 0.03f, FALSE);
LLFirstUse::notMoving(false);
showVisualContextMenuEffect();
+ return true;
}
else
{
@@ -601,10 +602,12 @@ void LLToolPie::walkToClickedLocation()
<< ", pick object was " << mPick.mObjectID
<< LL_ENDL;
mPick = saved_pick;
+ return false;
}
+ return true;
}
-void LLToolPie::teleportToClickedLocation()
+bool LLToolPie::teleportToClickedLocation()
{
LLViewerObject* objp = mHoverPick.getObject();
LLViewerObject* parentp = objp ? objp->getRootEdit() : NULL;
@@ -620,9 +623,11 @@ void LLToolPie::teleportToClickedLocation()
LLVector3d pos = mHoverPick.mPosGlobal;
pos.mdV[VZ] += gAgentAvatarp->getPelvisToFoot();
gAgent.teleportViaLocationLookAt(pos);
+ mPick = mHoverPick;
+ showVisualContextMenuEffect();
+ return true;
}
- mPick = mHoverPick;
- showVisualContextMenuEffect();
+ return false;
}
// When we get object properties after left-clicking on an object