summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-11-16 18:11:38 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-11-16 18:11:38 +0200
commit6fb3b50a29b03fb416db81a1871658219a9279b9 (patch)
treeafa0b68ed110a83daae4b313a72c4d0e69966ad5 /indra/newview/llinventorypanel.cpp
parentab7c9526450e54a379edf60db5fc8f28b3acbca6 (diff)
MAINT-8006 FIXED The items from 'Received items' panel are not displayed in 'Worn' tab
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp31
1 files changed, 4 insertions, 27 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)
{