summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp31
-rw-r--r--indra/newview/skins/default/xui/en/panel_media_settings_general.xml5
2 files changed, 29 insertions, 7 deletions
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index e1818cc68b..b9cb534034 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -39,6 +39,7 @@
#include "llagent.h"
#include "llviewerwindow.h"
#include "llviewermedia.h"
+#include "llvovolume.h"
#include "llsdutil.h"
#include "llselectmgr.h"
#include "llbutton.h"
@@ -452,9 +453,16 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
{
viewer_media_t media_impl =
LLViewerMedia::getInstance()->getMediaImplFromTextureID(object->getTE(face)->getMediaData()->getMediaID());
- if(media_impl)
- {
- media_impl->navigateHome();
+ if (media_impl)
+ {
+ media_impl->navigateHome();
+
+ if (!only_if_current_is_empty)
+ {
+ LLSD media_data;
+ media_data[LLMediaEntry::CURRENT_URL_KEY] = std::string();
+ object->getTE(face)->mergeIntoMediaData(media_data);
+ }
return true;
}
}
@@ -470,6 +478,23 @@ bool LLPanelMediaSettingsGeneral::navigateHomeSelectedFace(bool only_if_current_
LLObjectSelectionHandle selected_objects =LLSelectMgr::getInstance()->getSelection();
selected_objects->getSelectedTEValue( &functor_navigate_media, all_face_media_navigated );
+ if (all_face_media_navigated)
+ {
+ struct functor_sync_to_server : public LLSelectedObjectFunctor
+ {
+ virtual bool apply(LLViewerObject* object)
+ {
+ LLVOVolume *volume = dynamic_cast<LLVOVolume*>(object);
+ if (volume)
+ {
+ volume->sendMediaDataUpdate();
+ }
+ return true;
+ }
+ } sendfunc;
+ selected_objects->applyToObjects(&sendfunc);
+ }
+
// Note: we don't update the 'current URL' field until the media data itself changes
return all_face_media_navigated;
diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
index 2316beeb36..4c566dc60a 100644
--- a/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_media_settings_general.xml
@@ -92,10 +92,7 @@
label="Reset"
left_delta="233"
name="current_url_reset_btn"
- width="110" >
- <button.commit_callback
- function="Media.ResetCurrentUrl"/>
- </button>
+ width="110"/>
<check_box
bottom_delta="-25"
enabled="true"