summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelenvironment.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-02-08 12:44:29 -0800
committerGraham Linden <graham@lindenlab.com>2019-02-08 12:44:29 -0800
commit5c5b625892a86dfa467225c059f7ef1188ba46ca (patch)
tree65773de98719a3e7e85f9ba4a76371f3a90ce444 /indra/newview/llpanelenvironment.cpp
parent9f2a0d2a082495ce878f0eb0d7348b181939d348 (diff)
parentc909e496fd1a0710e5349441ef4e3cae5ff98de6 (diff)
Merge SL-10501 fix
Diffstat (limited to 'indra/newview/llpanelenvironment.cpp')
-rw-r--r--indra/newview/llpanelenvironment.cpp15
1 files changed, 12 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&notif, 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()