diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-25 23:58:27 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-25 23:58:27 +0200 |
commit | e01486715aa83e513f247c6db99b95cde47f433d (patch) | |
tree | 4730412950a4abd952817d69f7f38dbddea7eae4 /indra/newview | |
parent | d01f7afff206dd610b6c209e6bd69d646b47863f (diff) |
SL-18101 MoaP Reset button should reset the Current URL
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelmediasettingsgeneral.cpp | 31 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_media_settings_general.xml | 5 |
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" |