diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-07-11 01:24:22 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2023-07-11 01:24:22 +0300 |
commit | ba4b596894e8eb9b9eb51169b9b3f88c21173c29 (patch) | |
tree | 141530eb1b8be7d65b8e0b63c43a66a9f4ba02a0 /indra/newview/llpanelface.cpp | |
parent | bce11a1fa03b95782378ecb431850f77f762a348 (diff) |
SL-19141 Fixed applying a no-copy texture to two objects failing silently
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
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(); + } } } |