SL-17653 In texture picker cleaned up permanently invisible 'show folders' checkbox

master
Andrey Kleshchev 2022-08-31 22:42:52 +03:00
parent ce685a12b9
commit 8df1856f84
3 changed files with 1 additions and 36 deletions

View File

@ -410,10 +410,6 @@ BOOL LLFloaterTexturePicker::postBuild()
childSetAction("None", LLFloaterTexturePicker::onBtnNone,this);
childSetAction("Blank", LLFloaterTexturePicker::onBtnBlank,this);
childSetCommitCallback("show_folders_check", onShowFolders, this);
getChildView("show_folders_check")->setVisible( FALSE);
mFilterEdit = getChild<LLFilterEditor>("inventory search editor");
mFilterEdit->setCommitCallback(boost::bind(&LLFloaterTexturePicker::onFilterEdit, this, _2));
@ -505,7 +501,6 @@ void LLFloaterTexturePicker::draw()
updateImageStats();
// if we're inactive, gray out "apply immediate" checkbox
getChildView("show_folders_check")->setEnabled(mActive && mCanApplyImmediately && !mNoCopyTextureSelected);
getChildView("Select")->setEnabled(mActive && mCanApply);
getChildView("Pipette")->setEnabled(mActive);
getChild<LLUICtrl>("Pipette")->setValue(LLToolMgr::getInstance()->getCurrentTool() == LLToolPipette::getInstance());
@ -836,9 +831,6 @@ void LLFloaterTexturePicker::onModeSelect(LLUICtrl* ctrl, void *userdata)
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(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);
@ -1036,22 +1028,6 @@ void LLFloaterTexturePicker::onLocalScrollCommit(LLUICtrl* ctrl, void* userdata)
}
}
// static
void LLFloaterTexturePicker::onShowFolders(LLUICtrl* ctrl, void *user_data)
{
LLCheckBoxCtrl* check_box = (LLCheckBoxCtrl*)ctrl;
LLFloaterTexturePicker* picker = (LLFloaterTexturePicker*)user_data;
if (check_box->get())
{
picker->mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
}
else
{
picker->mInventoryPanel->setShowFolderState(LLInventoryFilter::SHOW_NO_FOLDERS);
}
}
// static
void LLFloaterTexturePicker::onApplyImmediateCheck(LLUICtrl* ctrl, void *user_data)
{

View File

@ -329,9 +329,7 @@ public:
//static void onBtnRevert( void* userdata );
static void onBtnBlank(void* userdata);
static void onBtnNone(void* userdata);
static void onBtnClear(void* userdata);
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
static void onShowFolders(LLUICtrl* ctrl, void* userdata);
static void onApplyImmediateCheck(LLUICtrl* ctrl, void* userdata);
void onTextureSelect(const LLTextureEntry& te);

View File

@ -175,22 +175,13 @@
bg_alpha_color="DkGray2"
border="false"
follows="all"
height="195"
height="200"
layout="topleft"
left_delta="0"
name="inventory panel"
top_pad="4"
width="231"
filter_asset_types="texture|material"/>
<check_box
height="14"
initial_value="false"
label="Show folders"
layout="topleft"
name="show_folders_check"
top_pad="0"
left_delta="-3"
width="200" />
<!-- middle: local mode -->
<button