diff options
Diffstat (limited to 'indra/newview/llpanelsnapshotoptions.cpp')
-rw-r--r-- | indra/newview/llpanelsnapshotoptions.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 776de460a9..962d3bba16 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -30,6 +30,7 @@ #include "llsidetraypanelcontainer.h" #include "llfloatersnapshot.h" // FIXME: create a snapshot model +#include "llsnapshotlivepreview.h" #include "llfloaterreg.h" #include "llagentbenefits.h" @@ -89,7 +90,19 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key) void LLPanelSnapshotOptions::updateUploadCost() { - S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(); + S32 w = 0; + S32 h = 0; + + if( mSnapshotFloater ) + { + LLSnapshotLivePreview* preview = mSnapshotFloater->getPreviewView(); + if( preview ) + { + preview->getSize(w, h); + } + } + + S32 upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(w, h); getChild<LLUICtrl>("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost)); } |