summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotinventory.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-09-14 09:55:18 -0700
committerRider Linden <rider@lindenlab.com>2016-09-14 09:55:18 -0700
commit51236b7c9c2e74639be6360b42154f21fecc9df8 (patch)
treeb720cf9f432e3bf6c2b100d25a0fce48e4be4219 /indra/newview/llpanelsnapshotinventory.cpp
parent694fe9cfc5a63f825bf77f4630c2da57c16171bf (diff)
parent4fb100ac7a33174883184f1320d0beac08ead3a7 (diff)
Merge
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index c55e230b5e..a2d1752c6a 100644
--- 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();
+ }
}