summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoolpie.cpp27
-rw-r--r--indra/newview/lltoolpie.h3
2 files changed, 11 insertions, 19 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index b1d09eccba..5f66e6b409 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -101,16 +101,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 +115,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 +136,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()
{
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 3660c68552..5f0e28fa95 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -71,9 +71,6 @@ public:
LLObjectSelection* getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; }
void resetSelection();
- static void leftMouseCallback(const LLPickInfo& pick_info);
- static void rightMouseCallback(const LLPickInfo& pick_info);
-
static void selectionPropertiesReceived();
static void showAvatarInspector(const LLUUID& avatar_id);