summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--[-rwxr-xr-x]indra/newview/llviewerwindow.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 589714c25c..8750b3b1f2 100755..100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -199,6 +199,8 @@
#include "llwindowlistener.h"
#include "llviewerwindowlistener.h"
#include "llpaneltopinfobar.h"
+#include "LLPathingLib.h"
+#include "llfloaterpathfindingconsole.h"
#if LL_WINDOWS
#include <tchar.h> // For Unicode conversion methods
@@ -832,6 +834,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
x = llround((F32)x / mDisplayScale.mV[VX]);
y = llround((F32)y / mDisplayScale.mV[VY]);
+
// only send mouse clicks to UI if UI is visible
if(gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
@@ -945,13 +948,26 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
}
}
+ //Determine if we have a pathing system and subsequently provide any mouse input
+ if (LLPathingLib::getInstance() != NULL)
+ {
+ LLHandle<LLFloaterPathfindingConsole> pathfindingConsoleHandle = LLFloaterPathfindingConsole::getInstanceHandle();
+ if (!pathfindingConsoleHandle.isDead())
+ {
+ LLFloaterPathfindingConsole *pathfindingConsoleFloater = pathfindingConsoleHandle.get();
+ if (pathfindingConsoleFloater->isGeneratePathMode(mask, clicktype, down))
+ {
+ return pathfindingConsoleFloater->handleAnyMouseClick(x, y, mask, clicktype, down);
+ }
+ }
+ }
+
// Do not allow tool manager to handle mouseclicks if we have disconnected
if(!gDisconnected && LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) )
{
return TRUE;
}
-
// 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.
BOOL default_rtn = !down;