diff options
Diffstat (limited to 'indra/newview/lltoolselectrect.cpp')
-rw-r--r-- | indra/newview/lltoolselectrect.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/lltoolselectrect.cpp b/indra/newview/lltoolselectrect.cpp index 67d9e2da65..0d403bbb28 100644 --- a/indra/newview/lltoolselectrect.cpp +++ b/indra/newview/lltoolselectrect.cpp @@ -78,18 +78,26 @@ void dialog_refresh_all(void); BOOL LLToolSelectRect::handleMouseDown(S32 x, S32 y, MASK mask) { + handlePick(gViewerWindow->pickImmediate(x, y, TRUE)); + + LLTool::handleMouseDown(x, y, mask); + + return mPick.getObject().notNull(); +} + +void LLToolSelectRect::handlePick(const LLPickInfo& pick) +{ + mPick = pick; + // start dragging rectangle setMouseCapture( TRUE ); - mDragStartX = x; - mDragStartY = y; - mDragEndX = x; - mDragEndY = y; + mDragStartX = pick.mMousePt.mX; + mDragStartY = pick.mMousePt.mY; + mDragEndX = pick.mMousePt.mX; + mDragEndY = pick.mMousePt.mY; mMouseOutsideSlop = FALSE; - - LLToolSelect::handleMouseDown(x, y, mask); - return TRUE; } |