summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupnotices.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-28 12:41:34 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-28 12:41:34 +0100
commit47fa4bc01478d5ef0311aa491321bfb397777302 (patch)
tree7d9ab0c14c56ece7b178dc9d8ab67633cd476af0 /indra/newview/llpanelgroupnotices.cpp
parentb740924c9dbb6a5697254ca238e099a62e7054a9 (diff)
parent96df3f3eb1351973d140ba73b507de44b1052c89 (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/newview/llpanelgroupnotices.cpp')
-rw-r--r--indra/newview/llpanelgroupnotices.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 8da19d1574..230e484fad 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -517,6 +517,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);
@@ -527,6 +532,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);
@@ -562,6 +574,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
mNoticesList->addElement(row, ADD_BOTTOM);
}
+ mNoticesList->setNeedsSort(save_sort);
mNoticesList->updateSort();
}
@@ -656,6 +669,9 @@ void LLPanelGroupNotices::setGroupID(const LLUUID& id)
if(mViewMessage)
mViewMessage->clear();
+
+ if(mViewInventoryName)
+ mViewInventoryName->clear();
activate();
}