diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-01 18:19:45 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-01 18:19:45 -0700 |
commit | dde2153014cd7d7b8fa704f7067a41344bfbb1c2 (patch) | |
tree | f7633ccef179644660897c8bf3684abeda3545f8 /indra/newview/llfloaterinventory.cpp | |
parent | 9b8b0571645f8b607ecc24221c807cc02a03692f (diff) | |
parent | 85ea690d47208f6dda020c8ff81021179fbdd0b8 (diff) |
merge of latest lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/newview/llfloaterinventory.cpp')
-rw-r--r-- | indra/newview/llfloaterinventory.cpp | 9 |
1 files changed, 6 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; } |