summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-30 19:35:03 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-04-30 19:37:26 +0300
commitf3806a4a05238230c5bf7ffe408d63bd662cb73c (patch)
tree14dbd063bc239fa9b080cdf0411893dccae8966d /indra
parent58b4afa0ba83891482851b67965d1b1dd5b7de76 (diff)
SL-15159 Switching uploader to 'load from file' causes a small freeze even if empty
Diffstat (limited to 'indra')
-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);