diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 2 | ||||
-rw-r--r-- | indra/newview/llviewermenufile.cpp | 8 |
3 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a07f3311f1..47d2c0e3c1 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1756,8 +1756,8 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable // this is the initial file picking. Close the whole floater // if we don't have a base model to show for high LOD. mFMP->closeFloater(false); - mLoading = false; } + mLoading = false; return; } @@ -4515,4 +4515,12 @@ void LLFloaterModelPreview::setPermissonsErrorStatus(S32 status, const std::stri LLNotificationsUtil::add("MeshUploadPermError"); } +bool LLFloaterModelPreview::isModelLoading() +{ + if(mModelPreview) + { + return mModelPreview->mLoading; + } + return false; +} diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 184315f604..df58b843cb 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -115,6 +115,8 @@ public: void enableViewOption(const std::string& option); void disableViewOption(const std::string& option); + bool isModelLoading(); + // shows warning message if agent has no permissions to upload model /*virtual*/ void onPermissionsReceived(const LLSD& result); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index b48b45502b..08d024e45c 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -93,6 +93,12 @@ class LLFileEnableUploadModel : public view_listener_t { bool handleEvent(const LLSD& userdata) { + LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) LLFloaterReg::findInstance("upload_model"); + if (fmp && fmp->isModelLoading()) + { + return false; + } + return true; } }; @@ -359,7 +365,7 @@ class LLFileUploadModel : public view_listener_t bool handleEvent(const LLSD& userdata) { LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) LLFloaterReg::getInstance("upload_model"); - if (fmp) + if (fmp && !fmp->isModelLoading()) { fmp->loadModel(3); } |