From 6e24218680c15bbf2c7529cb23481a1e39888ca9 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:27:17 +0300 Subject: #789 Cannot set the material to Default or None After setting material to Blank when blank material is present in inventory --- indra/newview/lltexturectrl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 5507ef517a..c3a98b33ff 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1012,6 +1012,8 @@ void LLFloaterTexturePicker::onBtnSetToDefault(void* userdata) { self->setImageID( self->getDefaultImageAssetID() ); self->setTentative(false); + // Deselect in case inventory has a selected item with the same id + self->mInventoryPanel->getRootFolder()->clearSelection(); } self->commitIfImmediateSet(); } @@ -1023,6 +1025,8 @@ void LLFloaterTexturePicker::onBtnBlank(void* userdata) self->setCanApply(true, true); self->setImageID( self->getBlankImageAssetID() ); self->setTentative(false); + // Deselect in case inventory has a selected item with the same id + self->mInventoryPanel->getRootFolder()->clearSelection(); self->commitIfImmediateSet(); } @@ -1034,6 +1038,8 @@ void LLFloaterTexturePicker::onBtnNone(void* userdata) self->setCanApply(true, true); self->setImageID( LLUUID::null ); self->setTentative(false); + // Deselect in case inventory has a selected item with null id + self->mInventoryPanel->getRootFolder()->clearSelection(); self->commitIfImmediateSet(); } -- cgit v1.2.3 From a54a96a1f4d4c06fb58dcd7be6d01a54d02bd86f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:46:14 +0300 Subject: #1759 Fix texture picker using IMG_WHITE for blank materials --- indra/newview/lltexturectrl.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c3a98b33ff..b2f2509e80 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1704,10 +1704,16 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p) mDefaultImageName(p.default_image_name), mFallbackImage(p.fallback_image) { - - // Default of defaults is white image for diff tex - // - setBlankImageAssetID(IMG_WHITE); + if (mInventoryPickType == PICK_MATERIAL) + { + setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID); + } + else + { + // Default of defaults is white image for diff tex + // + setBlankImageAssetID(IMG_WHITE); + } setAllowNoTexture(p.allow_no_texture); setCanApplyImmediately(p.can_apply_immediately); -- cgit v1.2.3