diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-07-12 13:22:01 -0500 |
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-07-12 13:22:01 -0500 |
| commit | 922bc0aa6ac35175618c54d1e5649678f6b62417 (patch) | |
| tree | 7c951d7d80ff2cf38d3b9edeb2e3f097ee1e025b /indra/newview/llfloatermodelpreview.cpp | |
| parent | ec0ee4f7c80bf5d32f50d2788545d629068f1cb1 (diff) | |
SH-2053 Don't poke the UI from a background thread -- it tends to get crashy.
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
| -rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 0939e7bbbf..abec392316 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -5482,7 +5482,17 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) void LLFloaterModelPreview::onModelPhysicsFeeReceived(const LLSD& result, std::string upload_url) { - mUploadModelUrl = upload_url; + mModelPhysicsFee = result; + mModelPhysicsFee["url"] = upload_url; + + doOnIdleOneTime(boost::bind(&LLFloaterModelPreview::handleModelPhysicsFeeReceived,this)); +} + +void LLFloaterModelPreview::handleModelPhysicsFeeReceived() +{ + const LLSD& result = mModelPhysicsFee; + mUploadModelUrl = result["url"].asString(); + childSetTextArg("weights", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal())); childSetTextArg("weights", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal())); childSetTextArg("weights", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal())); |
