diff options
author | Eric Tulla <tulla@lindenlab.com> | 2009-09-30 16:05:41 +0000 |
---|---|---|
committer | Eric Tulla <tulla@lindenlab.com> | 2009-09-30 16:05:41 +0000 |
commit | a3ba111e39be0bfa0278dfce66f4608fac7c0aa2 (patch) | |
tree | 92ae2429b888c6bfa7856e18a51a5ad4f78afa22 | |
parent | 6c70154cd1e5757e879f3f7463c0fedd69d82b63 (diff) |
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 .
-rw-r--r-- | indra/newview/llfloaterinventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfloaterinventory.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 27eb12b9cc..116286329c 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -1169,7 +1169,8 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) 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)); @@ -1230,9 +1231,10 @@ BOOL LLInventoryPanel::postBuild() 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. @@ -1332,9 +1334,10 @@ void LLInventoryPanel::modelChanged(U32 mask) 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; } diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index a40efe020b..1aaac74c87 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -179,6 +179,7 @@ protected: LLScrollContainer* mScroller; BOOL mAllowMultiSelect; std::string mSortOrderSetting; + bool mHasInventoryConnection; }; class LLFloaterInventory; |