summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermediafocus.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-10-28 16:53:45 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-10-28 16:53:45 +0200
commit726b00fd18107ef9aebf24b6d56ae8dcbb2003a6 (patch)
tree3030989a4c8a2c33991c0b19d001e925306add85 /indra/newview/llviewermediafocus.cpp
parent0e4f48950be95430a1a6052cd41790d807c31216 (diff)
parent2663bad36b4b02003b4b4c5989c2571c71504cd7 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewermediafocus.cpp')
-rw-r--r--indra/newview/llviewermediafocus.cpp18
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();