Fix media controls loading entered urls twice as much.

Thanks to Diva Canto for working with me on this!
This commit is contained in:
Inusaito Sayori
2014-12-05 18:41:08 -05:00
parent 80b4fe6613
commit 171c1a5c44

View File

@@ -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;