diff options
author | Dave Parks <davep@lindenlab.com> | 2011-07-09 17:01:33 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-07-09 17:01:33 -0500 |
commit | 29d5413ea6c2d0782ab55916d9d9428ae00c1ace (patch) | |
tree | 2078456cb1f0bf5fb898b7437b14ab8f3e342f64 /indra/newview/llfloatermodelpreview.cpp | |
parent | 7b102270f5bee9dbfd36a2afb5c6fc32a773abea (diff) |
SH-2007 Code cleanup, expand minimum header size to 4KB, better comments around magic numbers, remove dead calcResourceCost
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
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<LLModel*> 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 ) { |