diff options
| author | maxim_productengine <mnikolenko@productengine.com> | 2019-02-07 17:58:25 +0200 | 
|---|---|---|
| committer | maxim_productengine <mnikolenko@productengine.com> | 2019-02-07 17:58:25 +0200 | 
| commit | 43327798dec61590dc256697771e0423eb1ece9c (patch) | |
| tree | 2b223865c4e098cee9dbbeb06bd784d35b3eef65 /indra/newview | |
| parent | a9dd57c3517eb0ba1070f638d1eb6a4a56d4bfb7 (diff) | |
SL-10495 [EEP] Include a confirmation when clicking the Use Region Settings button
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llpanelenvironment.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 13 | 
2 files changed, 25 insertions, 3 deletions
| diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index 2cfd0c8fc9..06504bac37 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -42,6 +42,7 @@  #include "llfloaterreg.h"  #include "llfloatereditextdaycycle.h"  #include "llmultisliderctrl.h" +#include "llnotificationsutil.h"  #include "llsettingsvo.h"  #include "llappviewer.h" @@ -779,9 +780,17 @@ void LLPanelEnvironmentInfo::onAltSliderMouseUp()  void LLPanelEnvironmentInfo::onBtnDefault()  {      LLHandle<LLPanel> that_h = getHandle(); - -    LLEnvironment::instance().resetParcel(getParcelId(), -        [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); }); +    S32 parcel_id = getParcelId(); +    LLNotificationsUtil::add("SettingsConfirmReset", LLSD(), LLSD(), +        [that_h, parcel_id](const LLSD¬if, const LLSD&resp) +    { +        S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); +        if (opt == 0) +        { +            LLEnvironment::instance().resetParcel(parcel_id, +                [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); }); +        } +    });  }  void LLPanelEnvironmentInfo::onBtnEdit() diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5ea5023c94..dfc392e1f7 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -11310,6 +11310,19 @@ Are you sure you want to continue?    <notification     icon="alertmodal.tga" +   name="SettingsConfirmReset" +   type="alertmodal"> +You are about to remove all applied settings. +Are you sure you want to continue? +    <tag>confirm</tag> +    <usetemplate +     name="okcancelbuttons" +     notext="No" +     yestext="Yes"/> +  </notification> +   +  <notification +   icon="alertmodal.tga"     name="SettingsMakeNoTrans"     type="alertmodal">  You are about to import non-transferable settings into this daycycle. Continuing will cause the settings you are editing to become non-transferable also.  | 
