summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprimmediacontrols.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2009-11-20 17:49:52 -0800
committerMonroe Linden <monroe@lindenlab.com>2009-11-20 17:49:52 -0800
commit1b07c1d7fb5b6d3ce15083bc3dbb65a3f0ac8006 (patch)
tree34237f1926aee21a80f977e5b363a7c0a8592b21 /indra/newview/llpanelprimmediacontrols.cpp
parent8f451be20e6ef4f9965a9f7f8dbd9145124956b3 (diff)
Fix for DEV-43040 (Change media focus rules to be the same as alt-zoom).
Added an optional reset_camera parameter to LLPanelPrimMediaControls ::resetZoomLevel(). Default is true, but if false it prevents the reset from moving the camera, and just resets the internal state for zoom tracking. Fixed zoom-related bugs in LLPanelPrimMediaControls::close() and LLPanelPrimMediaControls::onClickZoom(). Changed the zooming behavior in LLViewerMediaFocus to match the desired behavior.
Diffstat (limited to 'indra/newview/llpanelprimmediacontrols.cpp')
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index aca0e1d5c7..529912929d 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -782,8 +782,8 @@ void LLPanelPrimMediaControls::onClickClose()
void LLPanelPrimMediaControls::close()
{
+ resetZoomLevel(true);
LLViewerMediaFocus::getInstance()->clearFocus();
- resetZoomLevel();
setVisible(FALSE);
}
@@ -921,8 +921,11 @@ void LLPanelPrimMediaControls::onClickSkipForward()
void LLPanelPrimMediaControls::onClickZoom()
{
focusOnTarget();
-
- nextZoomLevel();
+
+ if(mCurrentZoom == ZOOM_NONE)
+ {
+ nextZoomLevel();
+ }
}
void LLPanelPrimMediaControls::nextZoomLevel()
@@ -941,12 +944,15 @@ void LLPanelPrimMediaControls::nextZoomLevel()
updateZoom();
}
-void LLPanelPrimMediaControls::resetZoomLevel()
+void LLPanelPrimMediaControls::resetZoomLevel(bool reset_camera)
{
if(mCurrentZoom != ZOOM_NONE)
{
mCurrentZoom = ZOOM_NONE;
- updateZoom();
+ if(reset_camera)
+ {
+ updateZoom();
+ }
}
}