summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2009-12-18 15:26:25 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2009-12-18 15:26:25 -0500
commitcf5acb6af6eb2b9fe93789f84cb593b9fbe480aa (patch)
tree5d6f20ab156cb5254db9feed573c8834753cf9dd /indra/newview/llavatarlist.cpp
parentc1b58587dfe4711383b1878d341527221d2c298f (diff)
parent7836bba2dcaf47e2ccb43185507215c0cea9f76f (diff)
Automated merge with ssh://nyx@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r--indra/newview/llavatarlist.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 3bd4f898c8..71b23e1383 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llavatarlist.h"
+#include "llagent.h" // for comparator
// newview
#include "llcallingcard.h" // for LLAvatarTracker
@@ -420,3 +421,17 @@ bool LLAvatarItemNameComparator::doCompare(const LLAvatarListItem* avatar_item1,
return name1 < name2;
}
+bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const
+{
+ //keep agent on top, if first is agent,
+ //then we need to return true to elevate this id, otherwise false.
+ if(avatar_item1->getAvatarId() == gAgent.getID())
+ {
+ return true;
+ }
+ else if (avatar_item2->getAvatarId() == gAgent.getID())
+ {
+ return false;
+ }
+ return LLAvatarItemNameComparator::doCompare(avatar_item1,avatar_item2);
+}