diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-06 13:35:54 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-06 13:35:54 -0800 |
commit | 9130cc471263dd982efb84136c8f79cc8e48f7e9 (patch) | |
tree | be11bcefe3423fca99bc388e55878588ca9b501d /indra/newview/lltoolpie.cpp | |
parent | 078278bf51b50ded63d5f7c4a9d99146f72aba69 (diff) | |
parent | 327069dcb8d71e2fb603c0ddf505d692de64e461 (diff) |
Merge from viewer2 trunk again - some fairly important fixes there.
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r-- | indra/newview/lltoolpie.cpp | 27 |
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() { |