summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-07-23 00:01:51 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-07-23 18:55:55 +0300
commite05b32a0305f57573236c12dc4c1fbeecf2878ed (patch)
tree99a4213b00cf32c9e742636f761ac2d3dc99790d
parent472ea3b49a00c2988e519cd5cdb1947677edc04b (diff)
#4400 Model Import "use lod above" was not updating
-rw-r--r--indra/newview/llfloatermodelpreview.cpp16
-rw-r--r--indra/newview/llfloatermodelpreview.h2
2 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 5aef7f20b4..332a98031f 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -165,7 +165,7 @@ bool LLFloaterModelPreview::postBuild()
for (S32 lod = 0; lod <= LLModel::LOD_HIGH; ++lod)
{
LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[lod]);
- lod_source_combo->setCommitCallback(boost::bind(&LLFloaterModelPreview::onLoDSourceCommit, this, lod));
+ lod_source_combo->setCommitCallback(boost::bind(&LLFloaterModelPreview::onLoDSourceCommit, this, lod, true));
lod_source_combo->setCurrentByIndex(mLODMode[lod]);
getChild<LLButton>("lod_browse_" + lod_name[lod])->setCommitCallback(boost::bind(&LLFloaterModelPreview::onBrowseLOD, this, lod));
@@ -766,7 +766,7 @@ void LLFloaterModelPreview::onLODParamCommit(S32 lod, bool enforce_tri_limit)
LLComboBox* lod_source_combo = getChild<LLComboBox>("lod_source_" + lod_name[i]);
if (lod_source_combo->getCurrentIndex() == LLModelPreview::USE_LOD_ABOVE)
{
- onLoDSourceCommit(i);
+ onLoDSourceCommit(i, false);
}
else
{
@@ -1760,7 +1760,7 @@ void LLFloaterModelPreview::toggleCalculateButton(bool visible)
}
}
-void LLFloaterModelPreview::onLoDSourceCommit(S32 lod)
+void LLFloaterModelPreview::onLoDSourceCommit(S32 lod, bool refresh_ui)
{
mModelPreview->updateLodControls(lod);
@@ -1769,9 +1769,17 @@ void LLFloaterModelPreview::onLoDSourceCommit(S32 lod)
if (index == LLModelPreview::MESH_OPTIMIZER_AUTO
|| index == LLModelPreview::MESH_OPTIMIZER_SLOPPY
|| index == LLModelPreview::MESH_OPTIMIZER_PRECISE)
- { //rebuild LoD to update triangle counts
+ {
+ // rebuild LoD to update triangle counts
onLODParamCommit(lod, true);
}
+ else if (refresh_ui && index == LLModelPreview::USE_LOD_ABOVE)
+ {
+ // Update mUploadData for updateStatusMessages
+ mModelPreview->rebuildUploadData();
+ // Update UI with new triangle values
+ mModelPreview->updateStatusMessages();
+ }
}
void LLFloaterModelPreview::resetDisplayOptions()
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 6adc084fe8..5d23dc8d8e 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -208,7 +208,7 @@ private:
void onClickCalculateBtn();
void onJointListSelection();
- void onLoDSourceCommit(S32 lod);
+ void onLoDSourceCommit(S32 lod, bool refresh_ui);
void modelUpdated(bool calculate_visible);