From c521f3579281592291a507f8f7184fec80778962 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Tue, 28 Oct 2008 21:00:23 +0000 Subject: [PATCH] MGR: When removing a row from sorted lists, refresh all rows to ensure proper display update svn path=/trunk/boinc/; revision=16337 --- checkin_notes | 2 +- clientgui/BOINCBaseView.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index dae3643b21..bb00485825 100644 --- a/checkin_notes +++ b/checkin_notes @@ -8788,7 +8788,7 @@ Rom 28 Oct 2008 version.h Charlie 28 Oct 2008 - - MGR: When removing a row Projects, Tasks and Transfers tabs, refresh + - MGR: When removing a row in Projects, Tasks and Transfers tabs, refresh all rows. Fixes a bug where display was not always properly updated. clientgui/ diff --git a/clientgui/BOINCBaseView.cpp b/clientgui/BOINCBaseView.cpp index bbc8e899a1..753c2f67ec 100644 --- a/clientgui/BOINCBaseView.cpp +++ b/clientgui/BOINCBaseView.cpp @@ -265,6 +265,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) { if (0 >= iDocCount) { EmptyCache(); m_pListPane->DeleteAllItems(); + m_pListPane->SetItemCount(iDocCount); } else { int iIndex = 0; int iReturnValue = -1; @@ -274,16 +275,16 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) { wxASSERT(!iReturnValue); } wxASSERT(GetDocCount() == GetCacheCount()); - } else { + m_pListPane->SetItemCount(iDocCount); + } else { for (iIndex = 0; iIndex < (iCacheCount - iDocCount); iIndex++) { iReturnValue = RemoveCacheElement(); wxASSERT(!iReturnValue); } wxASSERT(GetDocCount() == GetCacheCount()); + m_pListPane->SetItemCount(iDocCount); m_pListPane->RefreshItems(0, iDocCount - 1); } - - m_pListPane->SetItemCount(iDocCount); } }