diff options
| author | Rider Linden <rider@lindenlab.com> | 2016-08-17 12:42:14 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2016-08-17 12:42:14 -0700 |
| commit | d258fe40353642b20524ef320b70e6b9bf0f8ec4 (patch) | |
| tree | 40918499d2a59dcbbac51f7d24930c174537fe27 /indra/newview/llpanelsnapshotinventory.cpp | |
| parent | 1edf48a0c763dee0f5d274ede6ab82d8d9b30246 (diff) | |
| parent | 4fb100ac7a33174883184f1320d0beac08ead3a7 (diff) | |
Merge
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
| -rw-r--r-- | 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 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(); + } } |
