From 69cbb4869e2804d0cd063eaa1d352824e13604fa Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:30:15 +0200 Subject: #5543 Clear pipette button's visibility logic for materials Removed the limitation as pipette now works for pbr materials. Logic wasn't working correctly as pipette stayed visible regardless of state. --- indra/newview/lltexturectrl.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'indra/newview/lltexturectrl.cpp') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index f0655901f7..001c4a0449 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -285,7 +285,7 @@ void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bo void LLFloaterTexturePicker::setActive( bool active ) { - if (!active && getChild("Pipette")->getValue().asBoolean()) + if (!active && mPipetteBtn->getValue().asBoolean()) { stopUsingPipette(); } @@ -1072,7 +1072,7 @@ void LLFloaterTexturePicker::onBtnSelect(void* userdata) void LLFloaterTexturePicker::onBtnPipette() { - bool pipette_active = getChild("Pipette")->getValue().asBoolean(); + bool pipette_active = mPipetteBtn->getValue().asBoolean(); pipette_active = !pipette_active; if (pipette_active) { @@ -1422,8 +1422,7 @@ void LLFloaterTexturePicker::changeMode() getChild("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE); getChild("hide_base_mesh_region")->setVisible(false);// index == 2); - bool pipette_visible = (index == PICKER_INVENTORY) - && (mInventoryPickType != PICK_MATERIAL); + bool pipette_visible = (index == PICKER_INVENTORY); mPipetteBtn->setVisible(pipette_visible); if (index == PICKER_BAKE) @@ -1563,15 +1562,8 @@ void LLFloaterTexturePicker::setInventoryPickType(EPickInventoryType type) refreshLocalList(); refreshInventoryFilter(); - if (mInventoryPickType == PICK_MATERIAL) - { - getChild("Pipette")->setVisible(false); - } - else - { - S32 index = mModeSelector->getValue().asInteger(); - getChild("Pipette")->setVisible(index == 0); - } + S32 index = mModeSelector->getValue().asInteger(); + mPipetteBtn->setVisible(index == 0); if (!mLabel.empty()) { -- cgit v1.3