From 1cf1459cbc261c3512ebd6f07ce7b1d0f078f627 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 26 Aug 2019 14:34:15 -0700 Subject: Make texture ctrl visibility set respect BOOL vs bool and use better naming. --- indra/newview/lltexturectrl.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 3830e11893..395e83a036 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -810,27 +810,27 @@ void LLFloaterTexturePicker::onSelectionChange(const std::dequemModeSelector->getSelectedIndex(); + int index = self->mModeSelector->getSelectedIndex(); - self->getChild("Default")->setVisible(mode == 0); - self->getChild("Blank")->setVisible(mode == 0); - self->getChild("None")->setVisible(mode == 0); - self->getChild("Pipette")->setVisible(mode == 0); - self->getChild("inventory search editor")->setVisible(mode == 0); - self->getChild("inventory panel")->setVisible(mode == 0); + self->getChild("Default")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild("Blank")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild("None")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild("Pipette")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild("inventory search editor")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild("inventory panel")->setVisible(index == 0 ? TRUE : FALSE); /*self->getChild("show_folders_check")->setVisible(mode); no idea under which conditions the above is even shown, needs testing. */ - self->getChild("l_add_btn")->setVisible(mode == 1); - self->getChild("l_rem_btn")->setVisible(mode == 1); - self->getChild("l_upl_btn")->setVisible(mode == 1); - self->getChild("l_name_list")->setVisible(mode == 1); + self->getChild("l_add_btn")->setVisible(index == 1 ? TRUE : FALSE); + self->getChild("l_rem_btn")->setVisible(index == 1 ? TRUE : FALSE); + self->getChild("l_upl_btn")->setVisible(index == 1 ? TRUE : FALSE); + self->getChild("l_name_list")->setVisible(index == 1 ? TRUE : FALSE); - self->getChild("l_bake_use_texture_combo_box")->setVisible(mode == 2); - self->getChild("hide_base_mesh_region")->setVisible(false);// mode == 2); + self->getChild("l_bake_use_texture_combo_box")->setVisible(index == 2 ? TRUE : FALSE); + self->getChild("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE); - if (mode == 2) + if (index == 2) { self->stopUsingPipette(); -- cgit v1.2.3