*** empty log message ***

svn path=/trunk/boinc/; revision=4799
This commit is contained in:
Rom Walton 2004-12-08 23:48:12 +00:00
parent 641491031f
commit 43fea339c2
1 changed files with 21 additions and 18 deletions

View File

@ -221,6 +221,8 @@ void CBOINCBaseView::OnListRender ( wxTimerEvent& event )
wxASSERT(NULL != m_pListPane);
m_pListPane->Freeze();
wxInt32 iDocCount = GetDocCount();
wxInt32 iCacheCount = GetCacheCount();
if ( iDocCount != iCacheCount )
@ -232,35 +234,36 @@ void CBOINCBaseView::OnListRender ( wxTimerEvent& event )
}
else
{
if ( iDocCount > iCacheCount )
if ( !(iDocCount == iCacheCount) )
{
wxInt32 iIndex = 0;
wxInt32 iReturnValue = -1;
for ( iIndex = iCacheCount; iIndex <= iDocCount; iIndex++ )
if ( iDocCount > iCacheCount )
{
iReturnValue = AddCacheElement();
wxASSERT( 0 == iReturnValue );
wxInt32 iIndex = 0;
wxInt32 iReturnValue = -1;
for ( iIndex = iCacheCount; iIndex <= iDocCount; iIndex++ )
{
iReturnValue = AddCacheElement();
wxASSERT( 0 == iReturnValue );
}
}
}
else
{
wxInt32 iIndex = 0;
wxInt32 iReturnValue = -1;
for ( iIndex = iDocCount; iIndex >= iCacheCount; iIndex-- )
else
{
iReturnValue = RemoveCacheElement();
wxASSERT( 0 == iReturnValue );
wxInt32 iIndex = 0;
wxInt32 iReturnValue = -1;
for ( iIndex = iDocCount; iIndex >= iCacheCount; iIndex-- )
{
iReturnValue = RemoveCacheElement();
wxASSERT( 0 == iReturnValue );
}
}
m_pListPane->SetItemCount(iDocCount);
}
}
}
m_pListPane->Freeze();
SyncronizeCache();
m_pListPane->SetItemCount(iDocCount);
if (EnsureLastItemVisible())
m_pListPane->EnsureVisible(iCacheCount);