MGR: When removing a row from sorted lists, refresh all rows to ensure proper display update

svn path=/trunk/boinc/; revision=16337
This commit is contained in:
Charlie Fenton 2008-10-28 21:00:23 +00:00
parent 7d78707787
commit c521f35792
2 changed files with 5 additions and 4 deletions

View File

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

View File

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