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.cpp27
1 files changed, 11 insertions, 16 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()
{