summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotlocal.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-08-03 16:19:47 -0700
committerRider Linden <rider@lindenlab.com>2018-08-03 16:19:47 -0700
commit56c773b3bc52d72a5a7056d6eb9ce014dedbc0d8 (patch)
treee9c39e4c9255a909ce0996b4cf228d562020fddb /indra/newview/llpanelsnapshotlocal.cpp
parent8779b29487dd3d18220b17be8dd501ffeabe274f (diff)
parent09f97172bb478a2c977d8b7b0958196e7e98c433 (diff)
Merge
Diffstat (limited to 'indra/newview/llpanelsnapshotlocal.cpp')
-rw-r--r--indra/newview/llpanelsnapshotlocal.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index 77378f8092..e7fced92a7 100644
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -65,6 +65,9 @@ private:
void onFormatComboCommit(LLUICtrl* ctrl);
void onQualitySliderCommit(LLUICtrl* ctrl);
void onSaveFlyoutCommit(LLUICtrl* ctrl);
+
+ void onLocalSaved();
+ void onLocalCanceled();
};
static LLPanelInjector<LLPanelSnapshotLocal> panel_class("llpanelsnapshotlocal");
@@ -164,19 +167,22 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl)
LLFloaterSnapshot* floater = LLFloaterSnapshot::getInstance();
floater->notify(LLSD().with("set-working", true));
- BOOL saved = floater->saveLocal();
- if (saved)
- {
- mSnapshotFloater->postSave();
- floater->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
- }
- else
- {
- cancel();
- floater->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local")));
- }
+ floater->saveLocal((boost::bind(&LLPanelSnapshotLocal::onLocalSaved, this)), (boost::bind(&LLPanelSnapshotLocal::onLocalCanceled, this)));
+}
+
+void LLPanelSnapshotLocal::onLocalSaved()
+{
+ mSnapshotFloater->postSave();
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("set-finished", LLSD().with("ok", true).with("msg", "local")));
+}
+
+void LLPanelSnapshotLocal::onLocalCanceled()
+{
+ cancel();
+ LLFloaterSnapshot::getInstance()->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local")));
}
+
LLSnapshotModel::ESnapshotType LLPanelSnapshotLocal::getSnapshotType()
{
return LLSnapshotModel::SNAPSHOT_LOCAL;