From 57017a7a6e65c885b6124849fd5da3eae68717f8 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 22 Jun 2011 14:26:15 -0400 Subject: EXP-920 FIX -- Received Items panel is not opened if closed when a new Direct Delivery items is delivered when user has Inventory panel open * Mac build fix by removing an unused variable * Inbox panel now auto-expands when new item delivered Reviewed by Richard --- indra/newview/llsidepanelinventory.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 79d68de289..1182e5db34 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -75,6 +75,8 @@ static const char * const OUTBOX_INVENTORY_PANEL = "inventory_outbox"; static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; +static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; + // // Helpers // @@ -293,6 +295,14 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) { // Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting LLInventoryModelBackgroundFetch::instance().start(inbox_id); + + // Expand the inbox since we have fresh items + LLPanelMarketplaceInbox * inbox = getChild(MARKETPLACE_INBOX_PANEL); + if (inbox && (inbox->getFreshItemCount() > 0)) + { + getChild(INBOX_BUTTON_NAME)->setToggleState(true); + onToggleInboxBtn(); + } } void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) @@ -367,7 +377,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key) LLFirstUse::newInventory(false); // Expand the inbox if we have fresh items - LLPanelMarketplaceInbox * inbox = getChild("marketplace_inbox"); + LLPanelMarketplaceInbox * inbox = getChild(MARKETPLACE_INBOX_PANEL); if (inbox && (inbox->getFreshItemCount() > 0)) { getChild(INBOX_BUTTON_NAME)->setToggleState(true); @@ -576,8 +586,6 @@ void LLSidepanelInventory::updateVerbs() bool LLSidepanelInventory::canShare() { - bool can_share = false; - LLPanelMainInventory* panel_main_inventory = mInventoryPanel->findChild("panel_main_inventory"); -- cgit v1.2.3