diff options
author | dolphin <dolphin@lindenlab.com> | 2014-08-06 09:22:43 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-08-06 09:22:43 -0700 |
commit | 81c342dfa9ac04378e22c76f119408e6e00c0f13 (patch) | |
tree | 728de42a95d436d7a753bf3884d683d4201b5ad0 /indra/newview/llnamelistctrl.cpp | |
parent | 3b2f456416d29534cb41fc9d4ad3bf195dcfc847 (diff) | |
parent | 1346949e4d601e8c945fa30593ba1d405e9ed80d (diff) |
Merge with 3.7.13-release
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rwxr-xr-x | indra/newview/llnamelistctrl.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 91866e5ca2..54e4c6c1da 100755 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -64,7 +64,8 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) mNameColumnIndex(p.name_column.column_index), mNameColumn(p.name_column.column_name), mAllowCallingCardDrop(p.allow_calling_card_drop), - mShortNames(p.short_names) + mShortNames(p.short_names), + mPendingLookupsRemaining(0) {} // public @@ -337,6 +338,17 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( mAvatarNameCacheConnections.erase(it); } mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, item->getHandle())); + + if(mPendingLookupsRemaining <= 0) + { + // BAKER TODO: + // We might get into a state where mPendingLookupsRemaining might + // go negative. So just reset it right now and figure out if it's + // possible later :) + mPendingLookupsRemaining = 0; + mNameListCompleteSignal(false); + } + mPendingLookupsRemaining++; } break; } @@ -388,6 +400,8 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id) { selectNthItem(idx); // not sure whether this is needed, taken from previous implementation deleteSingleItem(idx); + + mPendingLookupsRemaining--; } } @@ -429,6 +443,23 @@ void LLNameListCtrl::onAvatarNameCache(const LLUUID& agent_id, } } + ////////////////////////////////////////////////////////////////////////// + // BAKER - FIX NameListCtrl + //if (mPendingLookupsRemaining <= 0) + { + // We might get into a state where mPendingLookupsRemaining might + // go negative. So just reset it right now and figure out if it's + // possible later :) + //mPendingLookupsRemaining = 0; + + mNameListCompleteSignal(true); + } + //else + { + // mPendingLookupsRemaining--; + } + ////////////////////////////////////////////////////////////////////////// + dirtyColumns(); } |