diff options
author | Leslie Linden <leslie@lindenlab.com> | 2012-01-18 13:03:19 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2012-01-18 13:03:19 -0800 |
commit | eee28bd007178ac83053dfb891a7951d368bcc6e (patch) | |
tree | 841ce37e04f47e7ea0b1b1cf1a2790915c736d2a /indra/newview/llsidepanelinventory.cpp | |
parent | 40687a930c2e37a4da15ff15f004611a734583d7 (diff) |
EXP-1125 FIX -- New tags always shown in Received Items inbox when Inventory window is detached from side panel
EXP-1578 FIX -- received items folder shows shadows of content when scrolling through lots of folders in same window
* Put in guard to prevent the inventory panel from being created multiple times
Diffstat (limited to 'indra/newview/llsidepanelinventory.cpp')
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index e7d486e058..3761eb5777 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -71,8 +71,6 @@ static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel"; -static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox"; - static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; @@ -289,33 +287,43 @@ void LLSidepanelInventory::observeInboxCreation() void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID) { // + // Silently do nothing if we already have an inbox inventory panel set up + // (this can happen multiple times on the initial session that creates the inbox) + // + + if (mInventoryPanelInbox != NULL) + { + return; + } + + // // Track inbox folder changes // - + if (inboxID.isNull()) { - llwarns << "Attempting to track modifications to non-existant inbox" << llendl; + llwarns << "Attempting to track modifications to non-existent inbox" << llendl; return; } - + if (mCategoriesObserver == NULL) { mCategoriesObserver = new LLInventoryCategoriesObserver(); gInventory.addObserver(mCategoriesObserver); } - + mCategoriesObserver->addCategory(inboxID, boost::bind(&LLSidepanelInventory::onInboxChanged, this, inboxID)); - + // // Trigger a load for the entire contents of the Inbox // - + LLInventoryModelBackgroundFetch::instance().start(inboxID); - + // // Set up the inbox inventory view // - + LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL); mInventoryPanelInbox = inbox->setupInventoryPanel(); } |