summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-11-09 11:04:00 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-11-09 11:04:00 -0800
commitcef45c18239e0e4b59beb4671aa4f534ce408f61 (patch)
tree45d213fc1620e42e9952f655c61273a5c59ca0fb /indra
parentf4afd56f263816a7d767b29833cf62ae2eb51560 (diff)
EXP-1548 folder FIX -- Clicking show on inventory offer does not open inventory (or received items panel) on test grid Ravi set to use Received Items folder for transfers
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorypanel.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index f4e6d32510..acbec531b6 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1152,27 +1152,34 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L
LL_DEBUGS("Messaging") << "Highlighting" << obj_id << LL_ENDL;
LLViewerInventoryItem * item = gInventory.getItem(obj_id);
+ LLViewerInventoryCategory * cat = gInventory.getCategory(obj_id);
- bool item_in_inbox = false;
- bool item_in_outbox = false;
+ bool in_inbox = false;
+ bool in_outbox = false;
+
+ LLViewerInventoryCategory * parent_cat = NULL;
if (item)
{
- LLViewerInventoryCategory * cat = gInventory.getCategory(item->getParentUUID());
-
- if (cat)
- {
- item_in_inbox = (LLFolderType::FT_INBOX == cat->getPreferredType());
- item_in_outbox = (LLFolderType::FT_OUTBOX == cat->getPreferredType());
- }
+ 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());
+ in_outbox = (LLFolderType::FT_OUTBOX == parent_cat->getPreferredType());
}
- if (item_in_inbox || item_in_outbox)
+ if (in_inbox || in_outbox)
{
LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
LLInventoryPanel * inventory_panel = NULL;
- if (item_in_inbox)
+ if (in_inbox)
{
sidepanel_inventory->openInbox();
inventory_panel = sidepanel_inventory->getInboxPanel();