summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoolpie.cpp14
-rw-r--r--indra/newview/lltoolpie.h2
2 files changed, 10 insertions, 6 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index c71ed5ae47..a937f156e8 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -102,15 +102,19 @@ void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)
LLToolPie::getInstance()->pickLeftMouseDownCallback();
}
+// Spawn context menus on right mouse down so you can drag over and select
+// an item.
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, TRUE);
+ // claim not handled so UI focus stays same
return FALSE;
}
BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
{
LLToolMgr::getInstance()->clearTransientTool();
- gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE, TRUE);
return LLTool::handleRightMouseUp(x, y, mask);
}
@@ -118,7 +122,7 @@ BOOL LLToolPie::handleRightMouseUp(S32 x, S32 y, MASK mask)
void LLToolPie::rightMouseCallback(const LLPickInfo& pick_info)
{
LLToolPie::getInstance()->mPick = pick_info;
- LLToolPie::getInstance()->pickRightMouseUpCallback();
+ LLToolPie::getInstance()->pickRightMouseDownCallback();
}
// True if you selected an object.
@@ -729,8 +733,8 @@ static ECursorType cursor_from_parcel_media(U8 click_action)
}
-// True if you selected an object.
-BOOL LLToolPie::pickRightMouseUpCallback()
+// True if we handled the event.
+BOOL LLToolPie::pickRightMouseDownCallback()
{
S32 x = mPick.mMousePt.mX;
S32 y = mPick.mMousePt.mY;
@@ -826,7 +830,7 @@ BOOL LLToolPie::pickRightMouseUpCallback()
}
}
- LLTool::handleRightMouseUp(x, y, mask);
+ LLTool::handleRightMouseDown(x, y, mask);
// We handled the event.
return TRUE;
}
diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h
index 82de2b363e..d2437e813d 100644
--- a/indra/newview/lltoolpie.h
+++ b/indra/newview/lltoolpie.h
@@ -75,7 +75,7 @@ public:
private:
BOOL outsideSlop (S32 x, S32 y, S32 start_x, S32 start_y);
BOOL pickLeftMouseDownCallback();
- BOOL pickRightMouseUpCallback();
+ BOOL pickRightMouseDownCallback();
BOOL useClickAction (MASK mask, LLViewerObject* object,LLViewerObject* parent);
void showVisualContextMenuEffect();