summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index b1d09eccba..9ee848e30f 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -68,6 +68,7 @@
#include "llviewermedia.h"
#include "llvoavatarself.h"
#include "llviewermediafocus.h"
+#include "llvovolume.h"
#include "llworld.h"
#include "llui.h"
#include "llweb.h"
@@ -101,16 +102,13 @@ BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktyp
BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)
{
//left mouse down always picks transparent
- gViewerWindow->pickAsync(x, y, mask, leftMouseCallback, TRUE);
+ mPick = gViewerWindow->pickImmediate(x, y, TRUE);
+ mPick.mKeyMask = mask;
mGrabMouseButtonDown = TRUE;
- return TRUE;
-}
+
+ pickLeftMouseDownCallback();
-// static
-void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
-{
- LLToolPie::getInstance()->mPick = pick_info;
- LLToolPie::getInstance()->pickLeftMouseDownCallback();
+ return TRUE;
}
// Spawn context menus on right mouse down so you can drag over and select
@@ -118,8 +116,13 @@ void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
// don't pick transparent so users can't "pay" transparent objects
- gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE);
+ mPick = gViewerWindow->pickImmediate(x, y, FALSE);
+ mPick.mKeyMask = mask;
+
// claim not handled so UI focus stays same
+
+ pickRightMouseDownCallback();
+
return FALSE;
}
@@ -134,13 +137,6 @@ BOOL LLToolPie::handleScrollWheel(S32 x, S32 y, S32 clicks)
return LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks);
}
-// static
-void LLToolPie::rightMouseCallback(const LLPickInfo& pick_info)
-{
- LLToolPie::getInstance()->mPick = pick_info;
- LLToolPie::getInstance()->pickRightMouseDownCallback();
-}
-
// True if you selected an object.
BOOL LLToolPie::pickLeftMouseDownCallback()
{
@@ -634,12 +630,14 @@ static bool needs_tooltip(LLSelectNode* nodep)
return false;
LLViewerObject* object = nodep->getObject();
+ LLVOVolume* vovolume = dynamic_cast<LLVOVolume*>(object);
LLViewerObject *parent = (LLViewerObject *)object->getParent();
if (object->flagHandleTouch()
|| (parent && parent->flagHandleTouch())
|| object->flagTakesMoney()
|| (parent && parent->flagTakesMoney())
|| object->flagAllowInventoryAdd()
+ || (vovolume && vovolume->hasMedia())
)
{
return true;