From 798d367d54a6c6379ad355bd8345fa40e31e7fe9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 6 Sep 2008 18:24:57 -0500 Subject: Second Life viewer sources 1.21.0-RC --- linden/indra/newview/lltoolselectrect.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'linden/indra/newview/lltoolselectrect.cpp') diff --git a/linden/indra/newview/lltoolselectrect.cpp b/linden/indra/newview/lltoolselectrect.cpp index ceb0659..26d9756 100644 --- a/linden/indra/newview/lltoolselectrect.cpp +++ b/linden/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; } -- cgit v1.1