diff --git a/checkin_notes b/checkin_notes index 04cf445b47..24570d5e4a 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5736,3 +5736,11 @@ Charlie 3 Aug 2010 mac_build/ boinc.xcodeproj/ project.pbxproj + +Charlie 3 Aug 2010 + - MGR: clear notices display when selecting a different host to force display + of new host's notices. + + clientgui/ + NoticeListCtrl.cpp + ViewNotices.cpp diff --git a/clientgui/NoticeListCtrl.cpp b/clientgui/NoticeListCtrl.cpp index c122c9b6ee..9f1ce338cf 100644 --- a/clientgui/NoticeListCtrl.cpp +++ b/clientgui/NoticeListCtrl.cpp @@ -593,8 +593,11 @@ bool CNoticeListCtrl::UpdateUI() wxASSERT(pDoc); wxASSERT(wxDynamicCast(pDoc, CMainDocument)); - if (pDoc->GetNoticeCount() < 0) return true; - + if (pDoc->GetNoticeCount() < 0) { + SetItemCount(0); + return true; + } + if ( ((int)GetItemCount() != pDoc->GetNoticeCount()) || pDoc->notices.complete diff --git a/clientgui/ViewNotices.cpp b/clientgui/ViewNotices.cpp index 02305e069c..59c58315b2 100644 --- a/clientgui/ViewNotices.cpp +++ b/clientgui/ViewNotices.cpp @@ -134,6 +134,8 @@ void CViewNotices::OnListRender(wxTimerEvent& WXUNUSED(event)) { wxLogTrace(wxT("Function Start/End"), wxT("CViewNotices::OnListRender - Function Begin")); static bool s_bInProgress = false; + static wxString strLastMachineName = wxEmptyString; + wxString strNewMachineName = wxEmptyString; CMainDocument* pDoc = wxGetApp().GetDocument(); wxASSERT(pDoc); @@ -143,6 +145,14 @@ void CViewNotices::OnListRender(wxTimerEvent& WXUNUSED(event)) { if (s_bInProgress) return; s_bInProgress = true; + if (pDoc->IsConnected()) { + pDoc->GetConnectedComputerName(strNewMachineName); + if (strLastMachineName != strNewMachineName) { + strLastMachineName = strNewMachineName; + m_pHtmlListPane->Clear(); + } + } + m_pHtmlListPane->Freeze(); m_pHtmlListPane->UpdateUI(); m_pHtmlListPane->Thaw();