summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupnotices.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-27 08:35:32 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-27 08:35:32 +0100
commit72a94da05b66d25cd99963a4ea25e49b96431a72 (patch)
tree02d266742a731f433105b8206eb233026acf2622 /indra/newview/llpanelgroupnotices.cpp
parent53fd70142fb7cdefffb7845b78d1b8f58cb46e09 (diff)
parent611dfccfcb58878d24d65e50eca0f2364bb16ee5 (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/newview/llpanelgroupnotices.cpp')
-rw-r--r--indra/newview/llpanelgroupnotices.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index c0891ae749..9912f351c2 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -518,6 +518,11 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->setEnabled(TRUE);
+ //save sort state and set unsorted state to prevent unnecessary
+ //sorting while adding notices
+ bool save_sort = mNoticesList->isSorted();
+ mNoticesList->setNeedsSort(false);
+
for (;i<count;++i)
{
msg->getUUID("Data","NoticeID",id,i);
@@ -528,6 +533,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->setEnabled(FALSE);
return;
}
+
+ //with some network delays we can receive notice list more then once...
+ //so add only unique notices
+ S32 pos = mNoticesList->getItemIndex(id);
+
+ if(pos!=-1)//if items with this ID already in the list - skip it
+ continue;
msg->getString("Data","Subject",subj,i);
msg->getString("Data","FromName",name,i);
@@ -563,6 +575,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->addElement(row, ADD_BOTTOM);
}
+ mNoticesList->setNeedsSort(save_sort);
mNoticesList->updateSort();
}