diff options
author | andreykproductengine <akleshchev@productengine.com> | 2016-04-13 18:59:00 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2016-04-13 18:59:00 +0300 |
commit | eec33adf34db3fe0c32600808458e4307ede1bf0 (patch) | |
tree | 10919302c8706f061e02c97864ed4dbd13aa4fca /indra/newview/llpanelsnapshotinventory.cpp | |
parent | 2311d8c2b200574a0fb38c80222a0f09ce984f67 (diff) |
MAINT-3286 FIXED Fix error message on snapshot save when user has no L$
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rwxr-xr-x | indra/newview/llpanelsnapshotinventory.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index c55e230b5e..a2d1752c6a 100755 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -34,6 +34,8 @@ #include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model #include "llpanelsnapshot.h" #include "llviewercontrol.h" // gSavedSettings +#include "llstatusbar.h" // can_afford_transaction() +#include "llnotificationsutil.h" /** * The panel provides UI for saving snapshot as an inventory texture. @@ -102,6 +104,17 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) void LLPanelSnapshotInventory::onSend() { - LLFloaterSnapshot::saveTexture(); - LLFloaterSnapshot::postSave(); + S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + if (can_afford_transaction(expected_upload_cost)) + { + LLFloaterSnapshot::saveTexture(); + LLFloaterSnapshot::postSave(); + } + else + { + LLSD args; + args["COST"] = llformat("%d", expected_upload_cost); + LLNotificationsUtil::add("ErrorPhotoCannotAfford", args); + LLFloaterSnapshot::inventorySaveFailed(); + } } |