diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 27eb12b9ccca012bce6a1b94a04e0efea014043d..116286329c4f223e161d73e917728dd19c940398 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 a40efe020bf1cdb705b6b7071e8e80bceb5dccaf..1aaac74c870e9c1cce3a93f66325b672f26a6a91 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -179,6 +179,7 @@ class LLInventoryPanel : public LLPanel LLScrollContainer* mScroller; BOOL mAllowMultiSelect; std::string mSortOrderSetting; + bool mHasInventoryConnection; }; class LLFloaterInventory;