summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-03-09 14:18:59 -0600
committerDave Parks <davep@lindenlab.com>2011-03-09 14:18:59 -0600
commitff37381e8a369719332e287be9649cd1200f8371 (patch)
tree46c74380fc062b63e6c67db5f2a6735f9660b898
parentc8293e29caf4701f130141a88b90709a09143d4e (diff)
parentd1a2ce75e27f34141eeb8a45ae914c453c419f1b (diff)
merge
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp40
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml3
2 files changed, 30 insertions, 13 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index e33ce055f6..c2054bf00f 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -773,11 +773,13 @@ void LLFloaterModelPreview::onPhysicsStageExecute(LLUICtrl* ctrl, void* data)
if (stage == "Decompose")
{
+ sInstance->setStatusMessage(sInstance->getString("decomposing"));
sInstance->childSetVisible("Decompose", false);
sInstance->childSetVisible("decompose_cancel", true);
}
else if (stage == "Simplify")
{
+ sInstance->setStatusMessage(sInstance->getString("simplifying"));
sInstance->childSetVisible("Simplify", false);
sInstance->childSetVisible("simplify_cancel", true);
}
@@ -823,6 +825,8 @@ void LLFloaterModelPreview::onPhysicsStageCancel(LLUICtrl* ctrl, void*data)
DecompRequest* req = *iter;
req->mContinue = 0;
}
+
+ sInstance->mCurRequest.clear();
}
}
@@ -4301,10 +4305,13 @@ void LLFloaterModelPreview::setStatusMessage(const std::string& msg)
S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32 p1, S32 p2)
{
- setStatusMessage(llformat("%s: %d/%d", status, p1, p2));
- if (LLFloaterModelPreview::sInstance)
+ if (mContinue)
{
- LLFloaterModelPreview::sInstance->setStatusMessage(mStatusMessage);
+ setStatusMessage(llformat("%s: %d/%d", status, p1, p2));
+ if (LLFloaterModelPreview::sInstance)
+ {
+ LLFloaterModelPreview::sInstance->setStatusMessage(mStatusMessage);
+ }
}
return mContinue;
@@ -4312,20 +4319,27 @@ S32 LLFloaterModelPreview::DecompRequest::statusCallback(const char* status, S32
void LLFloaterModelPreview::DecompRequest::completed()
{ //called from the main thread
- mModel->setConvexHullDecomposition(mHull);
-
- if (sInstance)
+ if (mContinue)
{
- if (mContinue)
+ mModel->setConvexHullDecomposition(mHull);
+
+ if (sInstance)
{
- if (sInstance->mModelPreview)
+ if (mContinue)
{
- sInstance->mModelPreview->mPhysicsMesh[mModel] = mHullMesh;
- sInstance->mModelPreview->mDirty = true;
- LLFloaterModelPreview::sInstance->mModelPreview->refresh();
+ if (sInstance->mModelPreview)
+ {
+ sInstance->mModelPreview->mPhysicsMesh[mModel] = mHullMesh;
+ sInstance->mModelPreview->mDirty = true;
+ LLFloaterModelPreview::sInstance->mModelPreview->refresh();
+ }
}
- }
- sInstance->mCurRequest.erase(this);
+ sInstance->mCurRequest.erase(this);
+ }
+ }
+ else if (sInstance)
+ {
+ llassert(sInstance->mCurRequest.find(this) == sInstance->mCurRequest.end());
}
}
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 8a18861e1a..1ebb3b3fb1 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -18,6 +18,9 @@
<string name="mesh_status_too_many_vertices">Level of detail has too many vertices.</string>
<string name="mesh_status_missing_lod">Missing required level of detail.</string>
<string name="layer_all">All</string> <!-- Text to display in physics layer combo box for "all layers" -->
+ <string name="decomposing">Analyzing...</string>
+ <string name="simplifying">Simplifying...</string>
+
<text left="15" bottom="25" follows="top|left" height="15" name="name_label">
Name: