Anonymous avatar Anonymous 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:// .

Comments (0)

Files changed (2)


-	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);
 	// 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;


 	LLScrollContainer*			mScroller;
 	BOOL 						mAllowMultiSelect;
 	std::string					mSortOrderSetting;
+	bool						mHasInventoryConnection;
 class LLFloaterInventory;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.