summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 9e65409256..672104dd70 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -354,6 +354,18 @@ void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
resetPanDiff();
resetOrbitDiff();
mHUDTargetZoom = 1.f;
+
+ if (LLSelectMgr::getInstance()->mAllowSelectAvatar)
+ {
+ // resetting camera also resets position overrides in debug mode 'AllowSelectAvatar'
+ LLObjectSelectionHandle selected_handle = LLSelectMgr::getInstance()->getSelection();
+ if (selected_handle->getObjectCount() == 1
+ && selected_handle->getFirstObject() != NULL
+ && selected_handle->getFirstObject()->isAvatar())
+ {
+ LLSelectMgr::getInstance()->resetObjectOverrides(selected_handle);
+ }
+ }
}
// Allow camera to be moved somewhere other than behind avatar.