diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-09-27 19:54:10 +0100 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2018-09-27 19:54:10 +0100 |
| commit | a84ee929a5221aec07bcc93815ca6c57bb8ab6bb (patch) | |
| tree | ecf9694b9e772161b67c8b0935362b0e05cc7c7d /indra/newview/llpanelgroupnotices.cpp | |
| parent | 4d4255c27b45ed5e32fe7c4870e2ce3ed10cb140 (diff) | |
| parent | 58aef8beaf79dc83546a7b080014ca5030733ac8 (diff) | |
merge
Diffstat (limited to 'indra/newview/llpanelgroupnotices.cpp')
| -rw-r--r-- | indra/newview/llpanelgroupnotices.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 178b5db6c2..ce6834b4b3 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -303,6 +303,8 @@ void LLPanelGroupNotices::activate() { if(mNoticesList) mNoticesList->deleteAllItems(); + + mPrevSelectedNotice = LLUUID(); BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND); BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE); @@ -454,12 +456,18 @@ void LLPanelGroupNotices::refreshNotices() } +void LLPanelGroupNotices::clearNoticeList() +{ + mPrevSelectedNotice = mNoticesList->getStringUUIDSelectedItem(); + mNoticesList->deleteAllItems(); +} + void LLPanelGroupNotices::onClickRefreshNotices(void* data) { LL_DEBUGS() << "LLPanelGroupNotices::onClickGetPastNotices" << LL_ENDL; LLPanelGroupNotices* self = (LLPanelGroupNotices*)data; - self->mNoticesList->deleteAllItems(); + self->clearNoticeList(); LLMessageSystem* msg = gMessageSystem; msg->newMessage("GroupNoticesListRequest"); @@ -547,7 +555,6 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) LLSD row; row["id"] = id; - row["columns"][0]["column"] = "icon"; if (has_attachment) { @@ -575,7 +582,13 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) mNoticesList->setNeedsSort(save_sort); mNoticesList->updateSort(); - mNoticesList->selectFirstItem(); + if (mPanelViewNotice->getVisible()) + { + if (!mNoticesList->selectByID(mPrevSelectedNotice)) + { + mNoticesList->selectFirstItem(); + } + } } void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data) |
