diff options
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 66d80e3bc3..40c892f06a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -577,7 +577,14 @@ void LLFloaterModelPreview::draw() if (!mModelPreview->mLoading) { - childSetTextArg("status", "[STATUS]", getString("status_idle")); + if ( mModelPreview->getLoadState() > LLModelLoader::ERROR_PARSING ) + { + childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING))); + } + else + { + childSetTextArg("status", "[STATUS]", getString("status_idle")); + } } childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost)); @@ -1283,6 +1290,12 @@ bool LLModelLoader::doLoadModel() { LLPointer<LLModel> model = LLModel::loadModelFromDomMesh(mesh); + if(model->getStatus() != LLModel::NO_ERRORS) + { + setLoadState(ERROR_PARSING + model->getStatus()) ; + return true ; //abort + } + if (model.notNull() && validate_model(model)) { mModelList.push_back(model); @@ -2500,7 +2513,7 @@ U32 LLModelPreview::calcResourceCost() if (mFMP && mModelLoader) { - if ( getLoadState() != LLModelLoader::ERROR_PARSING ) + if ( getLoadState() < LLModelLoader::ERROR_PARSING ) { mFMP->childEnable("ok_btn"); } @@ -2854,7 +2867,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod) setPreviewLOD(lod); - if ( getLoadState() == LLModelLoader::ERROR_PARSING ) + if ( getLoadState() >= LLModelLoader::ERROR_PARSING ) { mFMP->childDisable("ok_btn"); } @@ -2936,8 +2949,14 @@ void LLModelPreview::loadModelCallback(S32 lod) LLMutexLock lock(this); if (!mModelLoader) { + mLoading = false ; return; } + if(getLoadState() >= LLModelLoader::ERROR_PARSING) + { + mLoading = false ; + return ; + } mModelLoader->loadTextures() ; @@ -3673,7 +3692,7 @@ void LLModelPreview::updateStatusMessages() } } - bool errorStateFromLoader = getLoadState() == LLModelLoader::ERROR_PARSING ? true : false; + bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false; bool skinAndRigOk = true; bool uploadingSkin = mFMP->childGetValue("upload_skin").asBoolean(); |