diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-02-10 18:08:00 -0800 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-02-10 18:08:00 -0800 |
commit | 60cb3f8fd29b4b978d5f9cbeae4a966ec6160a41 (patch) | |
tree | e35360425b5bb1191f73692c1c0c9644bec5bf7a /indra/newview/llviewertexture.cpp | |
parent | fd4aee8f83cf97392c01dd2157a6656eda148aef (diff) |
fix for EXT-4632: LLViewerMediaTexture::getMaxVirtualSize() sometimes returns bad values.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9893eb5dce..984f003411 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2995,6 +2995,10 @@ void LLViewerMediaTexture::initVirtualSize() void LLViewerMediaTexture::addMediaToFace(LLFace* facep) { + if(facep) + { + facep->setHasMedia(true) ; + } if(!mIsPlaying) { return ; //no need to add the face because the media is not in playing. @@ -3005,14 +3009,16 @@ void LLViewerMediaTexture::addMediaToFace(LLFace* facep) void LLViewerMediaTexture::removeMediaFromFace(LLFace* facep) { - if(!mIsPlaying) - { - return ; //no need to remove the face because the media is not in playing. - } if(!facep) { return ; } + facep->setHasMedia(false) ; + + if(!mIsPlaying) + { + return ; //no need to remove the face because the media is not in playing. + } mIsPlaying = FALSE ; //set to remove the media from the face. switchTexture(facep) ; |