summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermediafocus.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-22 21:28:07 +0100
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-05-22 21:28:07 +0100
commit689beff6698fcb8582c44f58bb9896606850b149 (patch)
tree7f567399e152057c1fe80a863ef660b5850bb324 /indra/newview/llviewermediafocus.cpp
parent313dbc7fea54cc58ceb8bd3437b91674360a3384 (diff)
parent3888de9439c20eb1698e16fb878a47d78cfdf85e (diff)
Merge 5.1.5
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r--indra/newview/llviewermediafocus.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp
index 7b4df3d3da..59165c1d71 100644
--- a/indra/newview/llviewermediafocus.cpp
+++ b/indra/newview/llviewermediafocus.cpp
@@ -82,7 +82,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac
if (media_impl.notNull() && objectp.notNull())
{
bool face_auto_zoom = false;
-
+ mPrevFocusedImplID = LLUUID::null;
mFocusedImplID = media_impl->getMediaTextureID();
mFocusedObjectID = objectp->getID();
mFocusedObjectFace = face;
@@ -403,6 +403,7 @@ void LLViewerMediaFocus::update()
else
{
// Someone else has focus -- back off.
+ mPrevFocusedImplID = mFocusedImplID;
clearFocus();
}
}
@@ -602,6 +603,15 @@ bool LLViewerMediaFocus::isZoomed() const
return (mMediaControls.get() && mMediaControls.get()->getZoomLevel() != LLPanelPrimMediaControls::ZOOM_NONE);
}
+bool LLViewerMediaFocus::isZoomedOnMedia(LLUUID media_id)
+{
+ if (isZoomed())
+ {
+ return (mFocusedImplID == media_id) || (mPrevFocusedImplID == media_id);
+ }
+ return false;
+}
+
LLUUID LLViewerMediaFocus::getControlsMediaID()
{
if(getFocusedMediaImpl())