diff options
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 4 |
2 files changed, 7 insertions, 28 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d610b920b9..798434a257 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1376,38 +1376,15 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (active_panel) { LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL; - - LLViewerInventoryItem * item = gInventory.getItem(obj_id); - LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id); - - bool in_inbox = false; - - LLViewerInventoryCategory * parent_cat = NULL; - - if (item) - { - parent_cat = gInventory.getCategory(item->getParentUUID()); - } - else if (cat) - { - parent_cat = gInventory.getCategory(cat->getParentUUID()); - } - - if (parent_cat) - { - in_inbox = (LLFolderType::FT_INBOX == parent_cat->getPreferredType()); - } + + bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); if (in_inbox) { LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory"); LLInventoryPanel * inventory_panel = NULL; - - if (in_inbox) - { - sidepanel_inventory->openInbox(); - inventory_panel = sidepanel_inventory->getInboxPanel(); - } + sidepanel_inventory->openInbox(); + inventory_panel = sidepanel_inventory->getInboxPanel(); if (inventory_panel) { diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index bf59d89b80..b004226bd5 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -179,7 +179,9 @@ BOOL LLPanelMainInventory::postBuild() mWornItemsPanel->setFilterWorn(); mWornItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mWornItemsPanel->setFilterLinks(LLInventoryFilter::FILTERLINK_EXCLUDE_LINKS); - mWornItemsPanel->getFilter().markDefault(); + LLInventoryFilter& worn_filter = mWornItemsPanel->getFilter(); + worn_filter.setFilterCategoryTypes(worn_filter.getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX)); + worn_filter.markDefault(); mWornItemsPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mWornItemsPanel, _1, _2)); } mSearchTypeCombo = getChild<LLComboBox>("search_type"); |