mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=4799
This commit is contained in:
parent
641491031f
commit
43fea339c2
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue