diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-10-28 15:50:36 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-10-28 15:50:36 +0200 |
commit | 2663bad36b4b02003b4b4c5989c2571c71504cd7 (patch) | |
tree | e0d301fabee6da382f55a86e06db4c466d5a4011 /indra/newview/llviewermediafocus.cpp | |
parent | 2bb9751d0aee01b8911f57150fb1e5ea258d7bb4 (diff) | |
parent | ea5a60c80f0243a7e5a6a7fd8357e7c3cd6b5d4d (diff) |
merge from default
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r-- | indra/newview/llviewermediafocus.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index cad8b5f0ce..b47e0b8406 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -77,7 +77,6 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac if (media_impl.notNull() && objectp.notNull()) { bool face_auto_zoom = false; - media_impl->focus(true); mFocusedImplID = media_impl->getMediaTextureID(); mFocusedObjectID = objectp->getID(); @@ -101,6 +100,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac llwarns << "Can't find media entry for focused face" << llendl; } + media_impl->focus(true); gFocusMgr.setKeyboardFocus(this); // We must do this before processing the media HUD zoom, or it may zoom to the wrong face. @@ -114,7 +114,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac } else { - if(hasFocus()) + if(mFocusedImplID != LLUUID::null) { if(mMediaHUD.get()) { @@ -249,20 +249,18 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, } void LLViewerMediaFocus::onFocusReceived() { - // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media. -// LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); -// if(media_impl.notNull()) -// media_impl->focus(true); + LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); + if(media_impl) + media_impl->focus(true); LLFocusableElement::onFocusReceived(); } void LLViewerMediaFocus::onFocusLost() { - // Don't do this here -- this doesn't change "inworld media focus", it just changes whether the viewer's input is focused on the media. -// LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); -// if(media_impl.notNull()) -// media_impl->focus(false); + LLViewerMediaImpl* media_impl = getFocusedMediaImpl(); + if(media_impl) + media_impl->focus(false); gViewerWindow->focusClient(); LLFocusableElement::onFocusLost(); |