diff options
author | Anchor Linden <anchor@lindenlab.com> | 2018-09-17 10:50:08 -0700 |
---|---|---|
committer | Anchor Linden <anchor@lindenlab.com> | 2018-09-17 10:50:08 -0700 |
commit | e5aeaa659a453674ef898cdd2ad6183d5eb77e41 (patch) | |
tree | 2c7196f2f80d11b6f6d660c5852299646f2d449a /indra/newview/llpanelsnapshotlocal.cpp | |
parent | 7318bd61f7a7ea89e471a6e0f3cc310786a3b41c (diff) | |
parent | 6f54add8a8852c8f3df86abebe38ef0ce4a6742c (diff) |
Merge
Diffstat (limited to 'indra/newview/llpanelsnapshotlocal.cpp')
-rw-r--r-- | indra/newview/llpanelsnapshotlocal.cpp | 28 |
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; |