From ba4b596894e8eb9b9eb51169b9b3f88c21173c29 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 11 Jul 2023 01:24:22 +0300 Subject: SL-19141 Fixed applying a no-copy texture to two objects failing silently --- indra/newview/llpanelface.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanelface.cpp') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 7d6015f557..702a8a82e2 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -520,7 +520,11 @@ void LLPanelFace::sendTexture() { id = mTextureCtrl->getImageAssetID(); } - LLSelectMgr::getInstance()->selectionSetImage(id); + if (!LLSelectMgr::getInstance()->selectionSetImage(id)) + { + // need to refresh value in texture ctrl + refresh(); + } } } @@ -3032,7 +3036,11 @@ void LLPanelFace::onCommitPbr(const LLSD& data) { id = pbr_ctrl->getImageAssetID(); } - LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id); + if (!LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id)) + { + // If failed to set material, refresh pbr_ctrl's value + refresh(); + } } } @@ -3056,8 +3064,14 @@ void LLPanelFace::onSelectPbr(const LLSD& data) { id = pbr_ctrl->getImageAssetID(); } - LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id); - LLSelectedTEMaterial::setMaterialID(this, id); + if (LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id)) + { + LLSelectedTEMaterial::setMaterialID(this, id); + } + else + { + refresh(); + } } } -- cgit v1.2.3