Created
November 26, 2014 06:23
-
-
Save diva/5e3f512defb2ff6c9ece to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
indra/newview/llmediactrl.cpp | 10 +++++++--- | |
1 file changed, 7 insertions(+), 3 deletions(-) | |
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp | |
index 80ed404..e4bbcec 100644 | |
--- a/indra/newview/llmediactrl.cpp | |
+++ b/indra/newview/llmediactrl.cpp | |
@@ -565,9 +565,12 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) | |
if (ensureMediaSourceExists()) | |
{ | |
- mCurrentNavUrl = url_in; | |
- mMediaSource->setSize(mTextureWidth, mTextureHeight); | |
- mMediaSource->navigateTo(url_in, mime_type, mime_type.empty()); | |
+ if (mCurrentNavUrl != url_in) | |
+ { | |
+ mCurrentNavUrl = url_in; | |
+ mMediaSource->setSize(mTextureWidth, mTextureHeight); | |
+ mMediaSource->navigateTo(url_in, mime_type, mime_type.empty()); | |
+ } | |
} | |
} | |
@@ -970,6 +973,7 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event) | |
case MEDIA_EVENT_LOCATION_CHANGED: | |
{ | |
LL_DEBUGS("Media") << "Media event: MEDIA_EVENT_LOCATION_CHANGED, new uri is: " << self->getLocation() << LL_ENDL; | |
+ mCurrentNavUrl = self->getLocation(); | |
}; | |
break; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment