Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions indra/newview/llfloatermodelpreview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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
{
Expand Down Expand Up @@ -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);

Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion indra/newview/llfloatermodelpreview.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class LLFloaterModelPreview : public LLFloaterModelUploadBase
void onClickCalculateBtn();
void onJointListSelection();

void onLoDSourceCommit(S32 lod);
void onLoDSourceCommit(S32 lod, bool refresh_ui);

void modelUpdated(bool calculate_visible);

Expand Down
Loading