MGR: clear notices display when selecting a different host to force display of new host's notices

svn path=/trunk/boinc/; revision=22105
This commit is contained in:
Charlie Fenton 2010-08-03 09:17:39 +00:00
parent b5996a2f5e
commit ac21aca5fa
3 changed files with 23 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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();