summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneloutfitsinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpaneloutfitsinventory.cpp')
-rw-r--r--indra/newview/llpaneloutfitsinventory.cpp30
1 files changed, 26 insertions, 4 deletions
diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 5b36a5406a..59cd01f920 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -56,7 +56,10 @@
#include "llmenugl.h"
#include "llviewermenu.h"
+#include "llviewercontrol.h"
+
static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory");
+bool LLPanelOutfitsInventory::sShowDebugEditor = false;
LLPanelOutfitsInventory::LLPanelOutfitsInventory() :
mActivePanel(NULL),
@@ -74,7 +77,7 @@ LLPanelOutfitsInventory::~LLPanelOutfitsInventory()
// virtual
BOOL LLPanelOutfitsInventory::postBuild()
{
-
+ sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor");
initTabPanels();
initListCommandsHandlers();
return TRUE;
@@ -86,6 +89,11 @@ void LLPanelOutfitsInventory::updateVerbs()
{
mParent->updateVerbs();
}
+
+ if (mListCommands)
+ {
+ mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor);
+ }
}
void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent)
@@ -96,6 +104,7 @@ void LLPanelOutfitsInventory::setParent(LLSidepanelAppearance* parent)
// virtual
void LLPanelOutfitsInventory::onSearchEdit(const std::string& string)
{
+ mFilterSubString = string;
if (string == "")
{
mActivePanel->setFilterSubString(LLStringUtil::null);
@@ -177,7 +186,6 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewIte
void LLPanelOutfitsInventory::onSelectorButtonClicked()
{
- /*
LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem();
LLFolderViewEventListener* listenerp = cur_item->getListener();
@@ -189,7 +197,6 @@ void LLPanelOutfitsInventory::onSelectorButtonClicked()
LLSideTray::getInstance()->showPanel("sidepanel_appearance", key);
}
- */
}
LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction()
@@ -235,7 +242,9 @@ void LLPanelOutfitsInventory::initListCommandsHandlers()
mListCommands->childSetAction("trash_btn", boost::bind(&LLPanelOutfitsInventory::onTrashButtonClick, this));
mListCommands->childSetAction("add_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this));
mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this));
-
+
+ mListCommands->childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this));
+
LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn");
trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this
, _4 // BOOL drop
@@ -433,6 +442,9 @@ void LLPanelOutfitsInventory::initTabPanels()
LLInventoryPanel *panel = (*iter);
panel->setSelectCallback(boost::bind(&LLPanelOutfitsInventory::onTabSelectionChange, this, panel, _1, _2));
}
+
+ mAppearanceTabs = getChild<LLTabContainer>("appearance_tabs");
+ mAppearanceTabs->setCommitCallback(boost::bind(&LLPanelOutfitsInventory::onTabChange, this));
}
void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel, const std::deque<LLFolderViewItem*> &items, BOOL user_action)
@@ -457,6 +469,16 @@ void LLPanelOutfitsInventory::onTabSelectionChange(LLInventoryPanel* tab_panel,
onSelectionChange(items, user_action);
}
+void LLPanelOutfitsInventory::onTabChange()
+{
+ mActivePanel = (LLInventoryPanel*)childGetVisibleTab("appearance_tabs");
+ if (!mActivePanel)
+ {
+ return;
+ }
+ mActivePanel->setFilterSubString(mFilterSubString);
+}
+
LLInventoryPanel* LLPanelOutfitsInventory::getActivePanel()
{
return mActivePanel;