summaryrefslogtreecommitdiff
path: root/indra/newview/llmanipscale.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2008-07-22 20:55:02 +0000
committerJosh Bell <josh@lindenlab.com>2008-07-22 20:55:02 +0000
commit35b4a91129bc3da3476e7f9d8d8eb923a621cc3e (patch)
tree2906124fe8371b6336e6f7231cd890d267a75d6d /indra/newview/llmanipscale.cpp
parentdf4f20d4f51e41355e876f734527b4245543415c (diff)
svn merge -r92710:92709 svn+ssh://svn.lindenlab.com/svn/linden/release --> release
Undo r92710 (for QAR-698) - went straight into release instead of a side branch for validation.
Diffstat (limited to 'indra/newview/llmanipscale.cpp')
-rw-r--r--indra/newview/llmanipscale.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 5859d4c75f..57c901e9bc 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -166,11 +166,19 @@ void LLManipScale::handleSelect()
LLManip::handleSelect();
}
+void LLManipScale::handleDeselect()
+{
+ mHighlightedPart = LL_NO_PART;
+ mManipPart = LL_NO_PART;
+ LLManip::handleDeselect();
+}
+
LLManipScale::LLManipScale( LLToolComposite* composite )
:
LLManip( std::string("Scale"), composite ),
mBoxHandleSize( 1.f ),
mScaledBoxHandleSize( 1.f ),
+ mManipPart( LL_NO_PART ),
mLastMouseX( -1 ),
mLastMouseY( -1 ),
mSendUpdateOnMouseUp( FALSE ),
@@ -208,7 +216,7 @@ void LLManipScale::render()
glPushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- F32 zoom = gAgent.mHUDCurZoom;
+ F32 zoom = gAgent.getAvatarObject()->mHUDCurZoom;
glScalef(zoom, zoom, zoom);
}
@@ -225,7 +233,7 @@ void LLManipScale::render()
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
mBoxHandleSize = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels();
- mBoxHandleSize /= gAgent.mHUDCurZoom;
+ mBoxHandleSize /= gAgent.getAvatarObject()->mHUDCurZoom;
}
else
{
@@ -308,7 +316,9 @@ BOOL LLManipScale::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
- if(mHighlightedPart != LL_NO_PART)
+ LLViewerObject* hit_obj = gViewerWindow->lastObjectHit();
+ if( hit_obj ||
+ (mHighlightedPart != LL_NO_PART) )
{
handled = handleMouseDownOnPart( x, y, mask );
}
@@ -436,7 +446,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y)
LLMatrix4 cfr(OGL_TO_CFR_ROTATION);
transform *= cfr;
LLMatrix4 window_scale;
- F32 zoom_level = 2.f * gAgent.mHUDCurZoom;
+ F32 zoom_level = 2.f * gAgent.getAvatarObject()->mHUDCurZoom;
window_scale.initAll(LLVector3(zoom_level / LLViewerCamera::getInstance()->getAspect(), zoom_level, 0.f),
LLQuaternion::DEFAULT,
LLVector3::zero);
@@ -1357,7 +1367,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
if(mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgent.mHUDCurZoom;
+ mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgent.getAvatarObject()->mHUDCurZoom;
}
else
@@ -1370,7 +1380,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
cam_at_axis.setVec(1.f, 0.f, 0.f);
- snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgent.mHUDCurZoom;
+ snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgent.getAvatarObject()->mHUDCurZoom;
}
else
{