Commits

Eric Tulla  committed a16b4d4

Cherry pick of simple fix for duplicate inventory folders (one non working) in some inventory panel views.
Result of:
svn merge -c 134827 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/currently-worn-folder-10 .

  • Participants
  • Parent commits c884737

Comments (0)

Files changed (2)

File indra/newview/llfloaterinventory.cpp

 	mScroller(NULL),
 	mSortOrderSetting(p.sort_order_setting),
 	mInventory(p.inventory),
-	mAllowMultiSelect(p.allow_multi_select)
+	mAllowMultiSelect(p.allow_multi_select),
+	mHasInventoryConnection(false)
 {
 	// contex menu callbacks
 	mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2));
 	mInventoryObserver = new LLInventoryPanelObserver(this);
 	mInventory->addObserver(mInventoryObserver);
 	// build view of inventory if inventory ready, otherwise wait for modelChanged() callback
-	if (mInventory->isInventoryUsable())
+	if (mInventory->isInventoryUsable() && !mHasInventoryConnection)
 	{
 		rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD);
+		mHasInventoryConnection = true;
 	}
 
 	// bit of a hack to make sure the inventory is open.
 	bool handled = false;
 
 	// inventory just initialized, do complete build
-	if ((mask & LLInventoryObserver::ADD) && gInventory.getChangedIDs().empty())
+	if ((mask & LLInventoryObserver::ADD) && gInventory.getChangedIDs().empty() && !mHasInventoryConnection)
 	{
 		rebuildViewsFor(LLUUID::null, LLInventoryObserver::ADD);
+		mHasInventoryConnection = true;
 		return;
 	}
 

File indra/newview/llfloaterinventory.h

 	LLScrollContainer*			mScroller;
 	BOOL 						mAllowMultiSelect;
 	std::string					mSortOrderSetting;
+	bool						mHasInventoryConnection;
 };
 
 class LLFloaterInventory;