MGR ViewTaskGrid: Force full refresh only if sort order has changed

svn path=/trunk/boinc/; revision=13169
This commit is contained in:
Charlie Fenton 2007-07-17 11:14:03 +00:00
parent 1624e3bd8c
commit 1cb66f1c8b
1 changed files with 13 additions and 2 deletions

View File

@ -914,9 +914,20 @@ void CViewWorkGrid::OnListRender( wxTimerEvent& WXUNUSED(event) ) {
(arrColumnDataChanged[m_pGridPane->sortColumn]==1) ||
m_pGridPane->sortNeededByLabelClick)
{
wxArrayString ordered_indexes;
for(int iRow = 0; iRow < iMax; iRow++) {
ordered_indexes.Add(m_pGridPane->GetCellValue(iRow, COLUMN_RESULTS_INDEX));
}
m_pGridPane->SortData();
// Refresh Grid
for(int iRow = 0; iRow < iMax; iRow++) {
if (ordered_indexes[iRow] != m_pGridPane->GetCellValue(iRow, COLUMN_RESULTS_INDEX)) {
// Refresh entire grid if sort order has changed
m_pGridPane->ForceRefresh();
break;
}
}
}
UpdateSelection();
}