summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelinventory.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-01-18 14:44:08 -0800
committerRichard Linden <none@none>2012-01-18 14:44:08 -0800
commite41ad89f7b68b5f9edaf1fd66decadb8e08d1dce (patch)
tree1d85e6fc419f93ef615f97f217400eabd29f804a /indra/newview/llsidepanelinventory.cpp
parent6ee627d4c065f3c5aedba4765823a65255679f09 (diff)
parent9f28dedc85b20e46338232a4aa91903bd6744ce1 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience
Diffstat (limited to 'indra/newview/llsidepanelinventory.cpp')
-rw-r--r--indra/newview/llsidepanelinventory.cpp28
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();
}