summaryrefslogtreecommitdiff
path: root/indra/newview/llmaniptranslate.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/llmaniptranslate.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/llmaniptranslate.cpp')
-rw-r--r--indra/newview/llmaniptranslate.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 7785b5a078..f4f3a535de 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -113,6 +113,7 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite )
mConeSize(0),
mArrowLengthMeters(0.f),
mPlaneManipOffsetMeters(0.f),
+ mManipPart(LL_NO_PART),
mUpdateTimer(),
mSnapOffsetMeters(0.f),
mArrowScales(1.f, 1.f, 1.f),
@@ -256,12 +257,21 @@ void LLManipTranslate::handleSelect()
LLManip::handleSelect();
}
+void LLManipTranslate::handleDeselect()
+{
+ mHighlightedPart = LL_NO_PART;
+ mManipPart = LL_NO_PART;
+ LLManip::handleDeselect();
+}
+
BOOL LLManipTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
{
BOOL handled = FALSE;
// didn't click in any UI object, so must have clicked in the world
- if( (mHighlightedPart == LL_X_ARROW ||
+ LLViewerObject* hit_obj = gViewerWindow->lastObjectHit();
+ if( hit_obj &&
+ (mHighlightedPart == LL_X_ARROW ||
mHighlightedPart == LL_Y_ARROW ||
mHighlightedPart == LL_Z_ARROW ||
mHighlightedPart == LL_YZ_PLANE ||
@@ -808,7 +818,7 @@ void LLManipTranslate::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);
@@ -1046,7 +1056,7 @@ void LLManipTranslate::render()
gGL.pushMatrix();
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- F32 zoom = gAgent.mHUDCurZoom;
+ F32 zoom = gAgent.getAvatarObject()->mHUDCurZoom;
glScalef(zoom, zoom, zoom);
}
{
@@ -1210,7 +1220,7 @@ void LLManipTranslate::renderSnapGuides()
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
- guide_size_meters = 1.f / gAgent.mHUDCurZoom;
+ guide_size_meters = 1.f / gAgent.getAvatarObject()->mHUDCurZoom;
mSnapOffsetMeters = mArrowLengthMeters * 1.5f;
}
else
@@ -1793,7 +1803,7 @@ void LLManipTranslate::renderTranslationHandles()
if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD)
{
mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWindowHeight();
- mArrowLengthMeters /= gAgent.mHUDCurZoom;
+ mArrowLengthMeters /= gAgent.getAvatarObject()->mHUDCurZoom;
}
else
{