summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1a2c84af73..8334da1836 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -308,31 +308,29 @@ LLPanelMainInventory::~LLPanelMainInventory( void )
// for example, LLParamSDParser doesn't know about U64,
// so some FilterOps params should be revised.
LLSD filterRoot;
- LLInventoryPanel* all_items_panel = getChild<LLInventoryPanel>(ALL_ITEMS);
- if (all_items_panel)
+ if (mAllItemsPanel)
{
LLSD filterState;
LLInventoryPanel::InventoryState p;
- all_items_panel->getFilter().toParams(p.filter);
- all_items_panel->getRootViewModel().getSorter().toParams(p.sort);
+ mAllItemsPanel->getFilter().toParams(p.filter);
+ mAllItemsPanel->getRootViewModel().getSorter().toParams(p.sort);
if (p.validateBlock(false))
{
LLParamSDParser().writeSD(filterState, p);
- filterRoot[all_items_panel->getName()] = filterState;
+ filterRoot[mAllItemsPanel->getName()] = filterState;
}
}
- LLInventoryPanel* panel = findChild<LLInventoryPanel>(RECENT_ITEMS);
- if (panel)
+ if (mRecentPanel)
{
LLSD filterState;
LLInventoryPanel::InventoryState p;
- panel->getFilter().toParams(p.filter);
- panel->getRootViewModel().getSorter().toParams(p.sort);
+ mRecentPanel->getFilter().toParams(p.filter);
+ mRecentPanel->getRootViewModel().getSorter().toParams(p.sort);
if (p.validateBlock(false))
{
LLParamSDParser().writeSD(filterState, p);
- filterRoot[panel->getName()] = filterState;
+ filterRoot[mRecentPanel->getName()] = filterState;
}
}
@@ -1525,17 +1523,13 @@ void LLPanelMainInventory::onAddButtonClick()
void LLPanelMainInventory::setActivePanel()
{
// Todo: should cover gallery mode in some way
- if(mSingleFolderMode && isListViewMode())
- {
- mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv");
- }
- else if(mSingleFolderMode && isCombinationViewMode())
+ if(mSingleFolderMode && (isListViewMode() || isCombinationViewMode()))
{
- mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv");
+ mActivePanel = mCombinationInventoryPanel;
}
else
{
- mActivePanel = (LLInventoryPanel*)getChild<LLTabContainer>("inventory filter tabs")->getCurrentPanel();
+ mActivePanel = (LLInventoryPanel*)mFilterTabs->getCurrentPanel();
}
mViewModeBtn->setEnabled(mSingleFolderMode || (getAllItemsPanel() == getActivePanel()));
}