summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-14 14:44:43 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-14 14:44:43 -0800
commit1a8008ea150d1eb9a8f4036988ef971fb1901cb3 (patch)
treea09d45e10d3b03c94256424ecd8f881e75551aae /indra/newview/llviewerwindow.cpp
parent04fe0399443cf4a5852e94cd3950ba1fd2d50562 (diff)
Backed out changeset f34a69c2af56
(this backs-out my backout, now that I'm happy the original merge works okay :))
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp34
1 files changed, 7 insertions, 27 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9285ab94dc..33bfee798a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -604,7 +604,6 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
{
const char* buttonname = "";
const char* buttonstatestr = "";
- BOOL handled = FALSE;
S32 x = pos.mX;
S32 y = pos.mY;
x = llround((F32)x / mDisplayScale.mV[VX]);
@@ -699,7 +698,10 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
}
else
{
- handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask);
+ if (top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask))
+ {
+ return TRUE;
+ }
}
}
@@ -717,34 +719,12 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl;
}
- if (down)
+ // Do not allow tool manager to handle mouseclicks if we have disconnected
+ if(!gDisconnected && LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
{
- if (gDisconnected)
- {
- return FALSE;
- }
-
- if(LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
- {
- return TRUE;
- }
+ return TRUE;
}
- else
- {
- if( !handled )
- {
- handled = mRootView->handleAnyMouseClick(x, y, mask, clicktype, down);
- }
- if( !handled )
- {
- LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
- if (tool)
- {
- handled = tool->handleAnyMouseClick(x, y, mask, clicktype, down);
- }
- }
- }
// If we got this far on a down-click, it wasn't handled.
// Up-clicks, though, are always handled as far as the OS is concerned.