Fix findChild frame drops when switching inventory panels
parent
ab4abd4387
commit
048ebff444
|
|
@ -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())
|
||||
if(mSingleFolderMode && (isListViewMode() || isCombinationViewMode()))
|
||||
{
|
||||
mActivePanel = getChild<LLInventoryPanel>("comb_single_folder_inv");
|
||||
}
|
||||
else if(mSingleFolderMode && 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()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10125,7 +10125,6 @@ void initialize_menus()
|
|||
|
||||
commit.add("Object.Buy", boost::bind(&handle_buy));
|
||||
commit.add("Object.Edit", boost::bind(&handle_object_edit));
|
||||
commit.add("Object.Edit", boost::bind(&handle_object_edit));
|
||||
commit.add("Object.EditGLTFMaterial", boost::bind(&handle_object_edit_gltf_material));
|
||||
commit.add("Object.Inspect", boost::bind(&handle_object_inspect));
|
||||
commit.add("Object.Open", boost::bind(&handle_object_open));
|
||||
|
|
|
|||
Loading…
Reference in New Issue