From 1a014427a257ba9ba78ab173fc5f2f9621d768a1 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 12 Jun 2018 17:45:55 +0300 Subject: MAINT-8727 FIXED Saving snapshot will cause disconnect if you do not choose path in File picker quickly --- indra/newview/llpanelsnapshotlocal.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelsnapshotlocal.cpp') diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 77378f8092..57c5915da2 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 LLPanelSnapshotLocal::onLocalSaved(); + void LLPanelSnapshotLocal::onLocalCanceled(); }; static LLPanelInjector 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; -- cgit v1.2.3 From 39525a4d48f0dd16b2e5f9850ab6fdd25d66b0ca Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 13 Jun 2018 15:05:00 +0300 Subject: build fix --- indra/newview/llpanelsnapshotlocal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelsnapshotlocal.cpp') diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 57c5915da2..e7fced92a7 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -66,8 +66,8 @@ private: void onQualitySliderCommit(LLUICtrl* ctrl); void onSaveFlyoutCommit(LLUICtrl* ctrl); - void LLPanelSnapshotLocal::onLocalSaved(); - void LLPanelSnapshotLocal::onLocalCanceled(); + void onLocalSaved(); + void onLocalCanceled(); }; static LLPanelInjector panel_class("llpanelsnapshotlocal"); -- cgit v1.2.3