diff options
author | Graham Linden <graham@lindenlab.com> | 2019-08-26 14:34:15 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-08-26 14:34:15 -0700 |
commit | 1cf1459cbc261c3512ebd6f07ce7b1d0f078f627 (patch) | |
tree | b1842a2e13f4f7f5154448e46ee77e0c78c8f07b /indra/newview/lltexturectrl.cpp | |
parent | 3dff18eb6981dec4231437b5fd67a4f7e6b4d9a2 (diff) |
Make texture ctrl visibility set respect BOOL vs bool and use better naming.
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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::deque<LLFolderViewItem void LLFloaterTexturePicker::onModeSelect(LLUICtrl* ctrl, void *userdata) { LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; - int mode = self->mModeSelector->getSelectedIndex(); + int index = self->mModeSelector->getSelectedIndex(); - self->getChild<LLButton>("Default")->setVisible(mode == 0); - self->getChild<LLButton>("Blank")->setVisible(mode == 0); - self->getChild<LLButton>("None")->setVisible(mode == 0); - self->getChild<LLButton>("Pipette")->setVisible(mode == 0); - self->getChild<LLFilterEditor>("inventory search editor")->setVisible(mode == 0); - self->getChild<LLInventoryPanel>("inventory panel")->setVisible(mode == 0); + self->getChild<LLButton>("Default")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild<LLButton>("Blank")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild<LLButton>("None")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild<LLButton>("Pipette")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild<LLFilterEditor>("inventory search editor")->setVisible(index == 0 ? TRUE : FALSE); + self->getChild<LLInventoryPanel>("inventory panel")->setVisible(index == 0 ? TRUE : FALSE); /*self->getChild<LLCheckBox>("show_folders_check")->setVisible(mode); no idea under which conditions the above is even shown, needs testing. */ - self->getChild<LLButton>("l_add_btn")->setVisible(mode == 1); - self->getChild<LLButton>("l_rem_btn")->setVisible(mode == 1); - self->getChild<LLButton>("l_upl_btn")->setVisible(mode == 1); - self->getChild<LLScrollListCtrl>("l_name_list")->setVisible(mode == 1); + self->getChild<LLButton>("l_add_btn")->setVisible(index == 1 ? TRUE : FALSE); + self->getChild<LLButton>("l_rem_btn")->setVisible(index == 1 ? TRUE : FALSE); + self->getChild<LLButton>("l_upl_btn")->setVisible(index == 1 ? TRUE : FALSE); + self->getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == 1 ? TRUE : FALSE); - self->getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(mode == 2); - self->getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(false);// mode == 2); + self->getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == 2 ? TRUE : FALSE); + self->getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE); - if (mode == 2) + if (index == 2) { self->stopUsingPipette(); |