summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloateravatar.cpp8
-rwxr-xr-xindra/newview/llmediactrl.cpp10
-rwxr-xr-xindra/newview/llmediactrl.h1
3 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/llfloateravatar.cpp b/indra/newview/llfloateravatar.cpp
index bdc5b581a9..31adf5b61e 100755
--- a/indra/newview/llfloateravatar.cpp
+++ b/indra/newview/llfloateravatar.cpp
@@ -34,6 +34,7 @@
#include "llfloateravatar.h"
#include "lluictrlfactory.h"
+#include "llmediactrl.h"
LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
@@ -43,6 +44,13 @@ LLFloaterAvatar::LLFloaterAvatar(const LLSD& key)
LLFloaterAvatar::~LLFloaterAvatar()
{
+ LLMediaCtrl* avatar_picker = findChild<LLMediaCtrl>("avatar_picker_contents");
+ if (avatar_picker)
+ {
+ avatar_picker->navigateStop();
+ avatar_picker->clearCache(); //images are reloading each time already
+ avatar_picker->unloadMediaSource();
+ }
}
BOOL LLFloaterAvatar::postBuild()
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 323445afa6..5490605c1b 100755
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -504,6 +504,16 @@ void LLMediaCtrl::navigateForward()
////////////////////////////////////////////////////////////////////////////////
//
+void LLMediaCtrl::navigateStop()
+{
+ if (mMediaSource && mMediaSource->hasMedia())
+ {
+ mMediaSource->getMediaPlugin()->browse_stop();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//
bool LLMediaCtrl::canNavigateBack()
{
if (mMediaSource)
diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h
index 5978a7a344..086b384a72 100755
--- a/indra/newview/llmediactrl.h
+++ b/indra/newview/llmediactrl.h
@@ -99,6 +99,7 @@ public:
void navigateBack();
void navigateHome();
void navigateForward();
+ void navigateStop();
void navigateToLocalPage( const std::string& subdir, const std::string& filename_in );
bool canNavigateBack();
bool canNavigateForward();