From 29d5413ea6c2d0782ab55916d9d9428ae00c1ace Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 9 Jul 2011 17:01:33 -0500 Subject: SH-2007 Code cleanup, expand minimum header size to 4KB, better comments around magic numbers, remove dead calcResourceCost --- indra/newview/llfloatermodelpreview.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index eb48955a64..b5a1bceebf 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -407,7 +407,6 @@ BOOL LLFloaterModelPreview::postBuild() childSetTextArg("status", "[STATUS]", getString("status_idle")); - //childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount)); childSetAction("ok_btn", onUpload, this); childDisable("ok_btn"); @@ -780,15 +779,6 @@ void LLFloaterModelPreview::draw() childSetVisible("decompose_cancel", false); } - U32 resource_cost = mModelPreview->mResourceCost*10; - - if (childGetValue("upload_textures").asBoolean()) - { - resource_cost += mModelPreview->mTextureSet.size()*10; - } - - childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d", resource_cost)); - if (mModelPreview) { gGL.color3f(1.f, 1.f, 1.f); @@ -3012,7 +3002,6 @@ U32 LLModelPreview::calcResourceCost() //ok_btn should not have been changed unless something was wrong with joint list } - U32 cost = 0; std::set accounted; U32 num_points = 0; U32 num_hulls = 0; @@ -3060,8 +3049,7 @@ U32 LLModelPreview::calcResourceCost() mFMP->childGetValue("upload_skin").asBoolean(), mFMP->childGetValue("upload_joints").asBoolean(), TRUE); - cost += gMeshRepo.calcResourceCost(ret); - + num_hulls += decomp.mHull.size(); for (U32 i = 0; i < decomp.mHull.size(); ++i) { @@ -3093,7 +3081,7 @@ U32 LLModelPreview::calcResourceCost() updateStatusMessages(); - return cost; + return streaming_cost; } void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost) @@ -5405,12 +5393,6 @@ void LLFloaterModelPreview::refresh(LLUICtrl* ctrl, void* user_data) sInstance->mModelPreview->mDirty = true; } -void LLFloaterModelPreview::updateResourceCost() -{ - U32 cost = mModelPreview->mResourceCost; - childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",cost)); -} - //static void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ) { -- cgit v1.2.3