summaryrefslogtreecommitdiff
path: root/indra/newview/llnamelistctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
-rwxr-xr-xindra/newview/llnamelistctrl.cpp33
1 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index b2a3a9f645..ba85aa7c9e 100755
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -65,7 +65,8 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
mNameColumn(p.name_column.column_name),
mAllowCallingCardDrop(p.allow_calling_card_drop),
mShortNames(p.short_names),
- mAvatarNameCacheConnection()
+ mAvatarNameCacheConnection(),
+ mPendingLookupsRemaining(0)
{}
// public
@@ -335,6 +336,17 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
mAvatarNameCacheConnection.disconnect();
}
mAvatarNameCacheConnection = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, 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;
}
@@ -386,6 +398,8 @@ void LLNameListCtrl::removeNameItem(const LLUUID& agent_id)
{
selectNthItem(idx); // not sure whether this is needed, taken from previous implementation
deleteSingleItem(idx);
+
+ mPendingLookupsRemaining--;
}
}
@@ -412,6 +426,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();
}