summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelsnapshotinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelsnapshotinventory.cpp')
-rw-r--r--indra/newview/llpanelsnapshotinventory.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp
index 4abb89120b..96b17acc40 100644
--- a/indra/newview/llpanelsnapshotinventory.cpp
+++ b/indra/newview/llpanelsnapshotinventory.cpp
@@ -155,7 +155,19 @@ void LLPanelSnapshotInventory::onResolutionCommit(LLUICtrl* ctrl)
void LLPanelSnapshotInventoryBase::onSend()
{
- S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost();
+ S32 w = 0;
+ S32 h = 0;
+
+ if( mSnapshotFloater )
+ {
+ LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView();
+ if( preview )
+ {
+ preview->getSize(w, h);
+ }
+ }
+
+ S32 expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h);
if (can_afford_transaction(expected_upload_cost))
{
if (mSnapshotFloater)