summaryrefslogtreecommitdiff
path: root/indra/newview/llmanip.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-11-19 09:28:35 -0800
committerRick Pasetto <rick@lindenlab.com>2009-11-19 09:28:35 -0800
commit51e640e5d753ac9dc005cd6827db77988a04b8fa (patch)
tree85cb5fc6626626b42df6a425a0663a515ac5362c /indra/newview/llmanip.cpp
parentd4ba73ed721fa0811474fc53300f560539d38018 (diff)
parent3e46ee6274d04d91657da92953b167fe94eb7f59 (diff)
Merge from remote repo
Diffstat (limited to 'indra/newview/llmanip.cpp')
-rw-r--r--indra/newview/llmanip.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index fa1dbe0603..f30821cacf 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -265,8 +265,8 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
BOOL result = FALSE;
- F32 mouse_x = ((F32)x / gViewerWindow->getWindowWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom;
- F32 mouse_y = ((F32)y / gViewerWindow->getWindowHeightScaled() - 0.5f) / gAgent.mHUDCurZoom;
+ F32 mouse_x = ((F32)x / gViewerWindow->getWorldViewWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom;
+ F32 mouse_y = ((F32)y / gViewerWindow->getWorldViewHeightScaled() - 0.5f) / gAgent.mHUDCurZoom;
LLVector3 origin_agent = gAgent.getPosAgentFromGlobal(origin);
LLVector3 mouse_pos = LLVector3(0.f, -mouse_x, mouse_y);
@@ -429,9 +429,10 @@ void LLManip::renderXYZ(const LLVector3 &vec)
const S32 PAD = 10;
std::string feedback_string;
LLVector3 camera_pos = LLViewerCamera::getInstance()->getOrigin() + LLViewerCamera::getInstance()->getAtAxis();
- S32 vertical_offset = gViewerWindow->getWindowHeightScaled() / 2 - VERTICAL_OFFSET;
- S32 window_center_x = gViewerWindow->getWindowWidthScaled() / 2;
- S32 window_center_y = gViewerWindow->getWindowHeightScaled() / 2;
+ S32 window_center_x = gViewerWindow->getWorldViewRectScaled().getWidth() / 2;
+ S32 window_center_y = gViewerWindow->getWorldViewRectScaled().getHeight() / 2;
+ S32 vertical_offset = window_center_y - VERTICAL_OFFSET;
+
glPushMatrix();
{