summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d9edd4dc30..1dbf0d84cb 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -342,7 +342,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));
}
@@ -803,9 +803,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();
@@ -1545,7 +1542,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));
@@ -1718,9 +1715,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);