summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolfocus.cpp
diff options
context:
space:
mode:
authorPalmer <palmer@lindenlab.com>2009-08-06 14:51:11 -0700
committerPalmer <palmer@lindenlab.com>2009-08-06 14:51:11 -0700
commitb2632c50efc12eacdcadace64e6c0f1906b86ff6 (patch)
treec32d7e9b29e37d5c30ac16dfac55733456d7eee0 /indra/newview/lltoolfocus.cpp
parent27cf39cdbf27fe52dcf9c70cfdadcc18ddf2e75c (diff)
parenta8d216e194327c7bee8a42c983f7f2ca01adb385 (diff)
Merge of my DEV-36732 work and all the main line login api work that went on.
Diffstat (limited to 'indra/newview/lltoolfocus.cpp')
-rw-r--r--indra/newview/lltoolfocus.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp
index ca78073575..297cf2c667 100644
--- a/indra/newview/lltoolfocus.cpp
+++ b/indra/newview/lltoolfocus.cpp
@@ -56,6 +56,8 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llmorphview.h"
+#include "llfloaterreg.h"
+#include "llfloatercamera.h"
// Globals
BOOL gCameraBtnZoom = TRUE;
@@ -254,7 +256,11 @@ void LLToolCamera::releaseMouse()
gViewerWindow->showCursor();
- LLToolMgr::getInstance()->clearTransientTool();
+ //for the situation when left click was performed on the Agent
+ if (!LLFloaterCamera::inFreeCameraMode())
+ {
+ LLToolMgr::getInstance()->clearTransientTool();
+ }
mMouseSteering = FALSE;
mValidClickPoint = FALSE;
@@ -359,7 +365,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
// Orbit tool
if (hasMouseCapture())
{
- const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWindowWidth();
+ const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth();
if (dx != 0)
{
@@ -387,7 +393,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
F32 dist = (F32) camera_to_focus.normVec();
// Fudge factor for pan
- F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWindowWidth();
+ F32 meters_per_pixel = 3.f * dist / gViewerWindow->getWorldViewWidth();
if (dx != 0)
{
@@ -409,7 +415,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
- const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWindowWidth();
+ const F32 RADIANS_PER_PIXEL = 360.f * DEG_TO_RAD / gViewerWindow->getWorldViewWidth();
if (dx != 0)
{