From 6da743ff169bbe6d3d08421f9ce1e378ccead470 Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Sun, 7 Feb 2010 18:07:20 +0100 Subject: Fixed #155: Double clicking your avatar triggers a TP request. --- linden/indra/newview/lltoolpie.cpp | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index 6bc36a5..626831f 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp @@ -694,9 +694,38 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; } + LLViewerObject *object = mPick.getObject(); + if(object) + { + //Zwagoth: No more teleport to HUD attachments. >:o + if (object->isHUDAttachment()) + { + LL_DEBUGS("DoubleClicks") << "Double clicked HUD" << LL_ENDL; + return FALSE; + } + + //Armin: No more teleport to other attachments or Avatars including self ... + if (object->isAttachment()) + { + LL_DEBUGS("DoubleClicks") << "Double clicked attachment (not HUD)" << LL_ENDL; + return FALSE; + } + + if (object->isAvatar()&& object == gAgent.getAvatarObject() ) + { + LL_DEBUGS("DoubleClicks") << "Double clicked self" << LL_ENDL; + return FALSE; + } + + if (object->isAvatar()) + { + LL_DEBUGS("DoubleClicks") << "Double clicked other Avatar" << LL_ENDL; + return FALSE;// or what about open profile or IM session or ... + } + } + std::string action = gSavedSettings.getString("DoubleClickAction"); LLStringUtil::toLower(action); - if (action == "none") { return FALSE; @@ -712,10 +741,6 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) else if (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()) { - //Zwagoth: No more teleport to HUD attachments. >:o - if(mPick.getObject().notNull() && mPick.getObject()->isHUDAttachment()) - return FALSE; - handle_go_to_confirm(); return TRUE; } -- cgit v1.1