mirror of https://github.com/BOINC/boinc.git
MGR: Always sort after a row is added or deleted.
svn path=/trunk/boinc/; revision=16352
This commit is contained in:
parent
384ebd262f
commit
b4d0ec65ea
|
@ -8815,10 +8815,11 @@ David 28 Oct 2008
|
|||
|
||||
Charlie 29 Oct 2008
|
||||
- MGR: Fix bug introduced yesterday.
|
||||
- MGR: Always sort after a row is added or deleted.
|
||||
- Mac: Add new files rr_sim.cpp,.h to XCode project.
|
||||
|
||||
clientgui/
|
||||
BOINCBaseView.cpp
|
||||
BOINCBaseView.cpp,.h
|
||||
mac_build/
|
||||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
|
|
|
@ -47,6 +47,7 @@ CBOINCBaseView::CBOINCBaseView(wxNotebook* pNotebook) :
|
|||
|
||||
m_bForceUpdateSelection = true;
|
||||
m_bIgnoreUIEvents = false;
|
||||
m_bNeedSort = false;
|
||||
|
||||
//
|
||||
// Setup View
|
||||
|
@ -275,6 +276,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
|
|||
}
|
||||
wxASSERT(GetDocCount() == GetCacheCount());
|
||||
m_pListPane->SetItemCount(iDocCount);
|
||||
m_bNeedSort = true;
|
||||
} else {
|
||||
for (iIndex = 0; iIndex < (iCacheCount - iDocCount); iIndex++) {
|
||||
iReturnValue = RemoveCacheElement();
|
||||
|
@ -283,6 +285,7 @@ void CBOINCBaseView::OnListRender(wxTimerEvent& event) {
|
|||
wxASSERT(GetDocCount() == GetCacheCount());
|
||||
m_pListPane->SetItemCount(iDocCount);
|
||||
m_pListPane->RefreshItems(0, iDocCount - 1);
|
||||
m_bNeedSort = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -457,7 +460,6 @@ int CBOINCBaseView::SynchronizeCache() {
|
|||
int iColumnIndex = 0;
|
||||
int iColumnTotal = 0;
|
||||
bool bNeedRefreshData = false;
|
||||
bool bNeedSort = false;
|
||||
|
||||
iRowTotal = GetDocCount();
|
||||
iColumnTotal = m_pListPane->GetColumnCount();
|
||||
|
@ -474,7 +476,7 @@ int CBOINCBaseView::SynchronizeCache() {
|
|||
m_pListPane->RefreshCell(iRowIndex, iColumnIndex);
|
||||
#endif
|
||||
if (iColumnIndex == m_iSortColumn) {
|
||||
bNeedSort = true;
|
||||
m_bNeedSort = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -485,8 +487,9 @@ int CBOINCBaseView::SynchronizeCache() {
|
|||
}
|
||||
}
|
||||
|
||||
if (bNeedSort) {
|
||||
if (m_bNeedSort) {
|
||||
sortData(); // Will mark moved items as needing refresh
|
||||
m_bNeedSort = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -177,6 +177,7 @@ protected:
|
|||
|
||||
bool m_bForceUpdateSelection;
|
||||
bool m_bIgnoreUIEvents;
|
||||
bool m_bNeedSort;
|
||||
|
||||
int m_iProgressColumn;
|
||||
|
||||
|
|
Loading…
Reference in New Issue