diff options
author | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2016-08-16 20:40:57 +0300 |
---|---|---|
committer | pavelkproductengine <pavelkproductengine@lindenlab.com> | 2016-08-16 20:40:57 +0300 |
commit | 05e77c5f261f2620519dfc6eda845307849308a7 (patch) | |
tree | 5c607f3e30a4f14070ec0efc84628ec654aaa3a7 /indra/newview/llpanelsnapshotinventory.cpp | |
parent | b496e4ff156ab2fb055e741b97ceda5751476e7f (diff) | |
parent | 4fb100ac7a33174883184f1320d0beac08ead3a7 (diff) |
Merge VOB with 4.0.8-release
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rw-r--r-- | indra/newview/llpanelsnapshotinventory.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index 408eb8fbf3..b2952834fb 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -35,6 +35,8 @@ #include "llpanelsnapshot.h" #include "llsnapshotlivepreview.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. @@ -153,10 +155,24 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl) void LLPanelSnapshotInventoryBase::onSend() { - if (mSnapshotFloater) + S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + if (can_afford_transaction(expected_upload_cost)) + { + if (mSnapshotFloater) + { + mSnapshotFloater->saveTexture(); + mSnapshotFloater->postSave(); + } + } + else { - mSnapshotFloater->saveTexture(); - mSnapshotFloater->postSave(); + LLSD args; + args["COST"] = llformat("%d", expected_upload_cost); + LLNotificationsUtil::add("ErrorPhotoCannotAfford", args); + if (mSnapshotFloater) + { + mSnapshotFloater->inventorySaveFailed(); + } } } |