From 7398efb1f4ccf36f9c107e920f38c3096cca2f2f Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 8 Dec 2023 20:15:47 +0200 Subject: SL-20701 FIXED Build tool texture tab shows incorrect material parameters in some cases --- indra/newview/llpanelface.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ffcc4be290..f0f66831cb 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1094,7 +1094,21 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) prev_obj_id = objectp->getID(); } } - + else + { + if (prev_obj_id != objectp->getID()) + { + if (has_pbr_material && (mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)) + { + mComboMatMedia->selectNthItem(MATMEDIA_PBR); + } + else if (!has_pbr_material && (mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)) + { + mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL); + } + prev_obj_id = objectp->getID(); + } + } mComboMatMedia->setEnabled(editable); LLRadioGroup* radio_mat_type = getChild("radio_material_type"); -- cgit v1.2.3