diff options
author | James Cook <james@lindenlab.com> | 2010-05-11 16:11:09 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-05-11 16:11:09 -0700 |
commit | 2b7153c26a6dd5284218253910f466a0faeff708 (patch) | |
tree | 8b8f54545c540d4e5f28d4a91215280117f52dff /indra/newview/llpanelgroupnotices.cpp | |
parent | bae06b4b62587bd567495e3940a323e4c635a63e (diff) | |
parent | 8e1dbbbb5628eee210a0a7c25f32287d7b754a8b (diff) |
merge from dessie/viewer-public right before SLE code landed
Diffstat (limited to 'indra/newview/llpanelgroupnotices.cpp')
-rw-r--r-- | indra/newview/llpanelgroupnotices.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 295a7aadb1..265505ea9b 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -39,6 +39,7 @@ #include "llcachename.h" #include "llinventory.h" #include "llviewerinventory.h" +#include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llfloaterinventory.h" @@ -330,7 +331,7 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item) mInventoryItem = inv_item; BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) + if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) { item_is_multi = TRUE; }; @@ -517,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); @@ -527,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); @@ -565,6 +578,7 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->addElement(row, ADD_BOTTOM); } + mNoticesList->setNeedsSort(save_sort); mNoticesList->updateSort(); } @@ -659,6 +673,9 @@ void LLPanelGroupNotices::setGroupID(const LLUUID& id) if(mViewMessage) mViewMessage->clear(); + + if(mViewInventoryName) + mViewInventoryName->clear(); activate(); } |