summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 999e4a9582..6f5b95b602 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1718,9 +1718,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);