From b1d9487556ab904da12757454dd7c5bf56a8a822 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 13 Mar 2018 18:31:27 +0200 Subject: =?UTF-8?q?MAINT-8382=20FIXED=20=E2=80=9CZoom=20back=E2=80=9D=20bu?= =?UTF-8?q?tton=20is=20displayed=20after=20selecting=20other=20nearby=20me?= =?UTF-8?q?dia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llviewermediafocus.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewermediafocus.cpp') 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 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()) -- cgit v1.2.3