summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-03-18 03:30:15 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-03-20 03:15:28 +0200
commit69cbb4869e2804d0cd063eaa1d352824e13604fa (patch)
treee17ddf78981f79bf4b0d56f9278d20251b49cab4 /indra/newview/lltexturectrl.cpp
parent166fa85705bd7501a1af81d4b529fa4b83038be7 (diff)
#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.
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp18
1 files changed, 5 insertions, 13 deletions
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<LLUICtrl>("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<LLUICtrl>("Pipette")->getValue().asBoolean();
+ bool pipette_active = mPipetteBtn->getValue().asBoolean();
pipette_active = !pipette_active;
if (pipette_active)
{
@@ -1422,8 +1422,7 @@ void LLFloaterTexturePicker::changeMode()
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE);
getChild<LLCheckBoxCtrl>("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<LLButton>("Pipette")->setVisible(false);
- }
- else
- {
- S32 index = mModeSelector->getValue().asInteger();
- getChild<LLButton>("Pipette")->setVisible(index == 0);
- }
+ S32 index = mModeSelector->getValue().asInteger();
+ mPipetteBtn->setVisible(index == 0);
if (!mLabel.empty())
{