From f45eb335df21bfacba3de679751627f219760283 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 20 Jul 2011 17:12:49 -0500 Subject: SH-715 Fix for bad "cancel" behavior in physics tab. --- indra/newview/llfloatermodelpreview.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 203be5bb1f..e045cf6729 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1032,6 +1032,11 @@ void LLFloaterModelPreview::onPhysicsStageCancel(LLUICtrl* ctrl, void*data) } sInstance->mCurRequest.clear(); + + if (sInstance->mModelPreview) + { + sInstance->mModelPreview->updateStatusMessages(); + } } } @@ -4296,7 +4301,7 @@ void LLModelPreview::updateStatusMessages() //fmp->childSetEnabled("physics_optimize", !use_hull); - bool enable = phys_tris > 0 || phys_hulls > 0; + bool enable = (phys_tris > 0 || phys_hulls > 0) && fmp->mCurRequest.empty(); //enable = enable && !use_hull && fmp->childGetValue("physics_optimize").asBoolean(); //enable/disable "analysis" UI @@ -4308,7 +4313,7 @@ void LLModelPreview::updateStatusMessages() child = panel->findNextSibling(child); } - enable = phys_hulls > 0; + enable = phys_hulls > 0 && fmp->mCurRequest.empty(); //enable/disable "simplification" UI panel = fmp->getChild("physics simplification"); child = panel->getFirstChild(); @@ -4335,6 +4340,11 @@ void LLModelPreview::updateStatusMessages() fmp->childEnable("Decompose"); } } + else + { + fmp->childEnable("simplify_cancel"); + fmp->childEnable("decompose_cancel"); + } } const char* lod_controls[] = -- cgit v1.2.3