diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-01-10 23:51:52 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-01-10 23:51:52 +0200 |
commit | 469ce7f7f6828aa8ed8d45fdff82cb33c1ec655d (patch) | |
tree | 6ec74d5dbe9c278663a99212cddf808e87d4e6c6 /indra/newview/llfloatermodelpreview.cpp | |
parent | 83b4ea59fc8793ccbfb6b40ffff111de14ebd4d3 (diff) | |
parent | ee2d618706a8803372b92dbe47a165c70be6cef9 (diff) |
Merge branch 'DRTVWR-530-maint' into DRTVWR-553-maint-mix-JK
# Conflicts:
# indra/newview/app_settings/key_bindings.xml
# indra/newview/llappviewer.cpp
# indra/newview/llkeyconflict.cpp
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 64b24d54c3..abc64a7ad9 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -343,7 +343,7 @@ void LLFloaterModelPreview::initModelPreview() mModelPreview = new LLModelPreview(tex_width, tex_height, this); mModelPreview->setPreviewTarget(PREVIEW_CAMERA_DISTANCE); - mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3, _4, _5)); + mModelPreview->setDetailsCallback(boost::bind(&LLFloaterModelPreview::setDetails, this, _1, _2, _3)); mModelPreview->setModelUpdatedCallback(boost::bind(&LLFloaterModelPreview::modelUpdated, this, _1)); } @@ -804,9 +804,6 @@ void LLFloaterModelPreview::draw() } } - childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost)); - childSetTextArg("description_label", "[TEXTURES]", llformat("%d", mModelPreview->mTextureSet.size())); - if (!isMinimized() && mModelPreview->lodsReady()) { draw3dPreview(); @@ -1546,7 +1543,7 @@ void LLFloaterModelPreview::addStringToLogTab(const std::string& str, bool flash } } -void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z, F32 streaming_cost, F32 physics_cost) +void LLFloaterModelPreview::setDetails(F32 x, F32 y, F32 z) { assert_main_thread(); childSetTextArg("import_dimensions", "[X]", llformat("%.3f", x)); @@ -1719,9 +1716,20 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible) void LLFloaterModelPreview::onLoDSourceCommit(S32 lod) { mModelPreview->updateLodControls(lod); - refresh(); LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[lod]); + + if (lod_source_combo->getCurrentIndex() == LLModelPreview::LOD_FROM_FILE + && mModelPreview->mLODFile[lod].empty()) + { + // File wasn't selected, so nothing to do yet, refreshing + // hovewer will cause a small freeze with large meshes + // Might be good idea to open filepicker here + return; + } + + refresh(); + if (lod_source_combo->getCurrentIndex() == LLModelPreview::GENERATE) { //rebuild LoD to update triangle counts onLODParamCommit(lod, true); |