From 350894fc0b7b3b806350f3409765105cdf73d3e9 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 11 Aug 2011 02:00:56 +0300 Subject: SH-2064 FIXED 'Upload' button disabled while mesh upload is in progress. --- indra/newview/llfloatermodelpreview.cpp | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 95dcf8ba1e..dd30671aaa 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -429,8 +429,6 @@ BOOL LLFloaterModelPreview::postBuild() childDisable("upload_skin"); childDisable("upload_joints"); - - childDisable("ok_btn"); mViewOptionMenuButton = getChild("options_gear_btn"); @@ -775,8 +773,6 @@ void LLFloaterModelPreview::draw() } } - childSetEnabled("ok_btn", mHasUploadPerm && !mUploadModelUrl.empty()); - childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost)); childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size())); @@ -3004,14 +3000,6 @@ U32 LLModelPreview::calcResourceCost() rebuildUploadData(); - if (mFMP && mModelLoader) - { - if ( getLoadState() < LLModelLoader::ERROR_PARSING) - { - mFMP->childEnable("ok_btn"); - } - } - //Upload skin is selected BUT check to see if the joints coming in from the asset were malformed. if ( mFMP && mFMP->childGetValue("upload_skin").asBoolean() ) { @@ -3140,11 +3128,6 @@ void LLModelPreview::rebuildUploadData() F32 max_scale = 0.f; - if ( mBaseScene.size() > 0) - { - mFMP->childEnable("ok_btn"); - } - //reorder materials to match mBaseModel for (U32 i = 0; i < LLModel::NUM_LODS; i++) { @@ -4245,11 +4228,7 @@ void LLModelPreview::updateStatusMessages() } } - if ( upload_ok && !errorStateFromLoader && skinAndRigOk && !has_degenerate) - { - mFMP->childEnable("ok_btn"); - } - else + if (!upload_ok || errorStateFromLoader || !skinAndRigOk || has_degenerate) { mFMP->childDisable("ok_btn"); } @@ -5438,6 +5417,8 @@ void LLFloaterModelPreview::onUpload(void* user_data) LLFloaterModelPreview* mp = (LLFloaterModelPreview*) user_data; + mp->mUploadBtn->setEnabled(false); + mp->mModelPreview->rebuildUploadData(); bool upload_skinweights = mp->childGetValue("upload_skin").asBoolean(); @@ -5586,6 +5567,7 @@ void LLFloaterModelPreview::onModelUploadFailure() { assert_main_thread(); toggleCalculateButton(true); + mUploadBtn->setEnabled(true); } S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32 p1, S32 p2) -- cgit v1.2.3 From 1d4ccaeb74641ebf199072c8568e26f8fe002d32 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Wed, 17 Aug 2011 16:29:20 +0300 Subject: SH-2285 FIXED Add localization capability to mesh uploader strings - Added the convex decomposition strings to the strings.xml - Added names to hardcoded strings. --- indra/newview/llfloatermodelpreview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index c8f4c3ac36..609fb42cc6 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -96,6 +96,7 @@ #include "llsliderctrl.h" #include "llspinctrl.h" #include "lltoggleablemenu.h" +#include "lltrans.h" #include "llvfile.h" #include "llvfs.h" #include "llcallbacklist.h" @@ -1154,7 +1155,11 @@ void LLFloaterModelPreview::initDecompControls() //llinfos << param[i].mDetails.mEnumValues.mEnumsArray[k].mValue // << " - " << param[i].mDetails.mEnumValues.mEnumsArray[k].mName << llendl; - combo_box->add(param[i].mDetails.mEnumValues.mEnumsArray[k].mName, + std::string name(param[i].mDetails.mEnumValues.mEnumsArray[k].mName); + std::string localized_name; + bool is_localized = LLTrans::findString(localized_name, name); + + combo_box->add(is_localized ? localized_name : name, LLSD::Integer(param[i].mDetails.mEnumValues.mEnumsArray[k].mValue)); } combo_box->setValue(param[i].mDefault.mIntOrEnumValue); -- cgit v1.2.3