From 775b12ad84ab1e8e2db4dde4a10363cecebe7753 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Thu, 11 Dec 2014 06:47:51 -0800 Subject: [PATCH] MGR: Fix a couple of small bugs in selectively hidden list columns. --- clientgui/BOINCListCtrl.cpp | 3 +++ clientgui/mac/MacAccessiblity.mm | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/clientgui/BOINCListCtrl.cpp b/clientgui/BOINCListCtrl.cpp index 85656fd9b2..af2065ee5b 100644 --- a/clientgui/BOINCListCtrl.cpp +++ b/clientgui/BOINCListCtrl.cpp @@ -332,6 +332,9 @@ void CBOINCListCtrl::SetListColumnOrder(wxArrayString& orderArray) { pView->m_iSortColumnID = pView->m_iColumnIndexToColumnID[0]; pView->m_bReverseSort = false; pView->SetSortColumn(0); + } else { + // Redraw the sort arrow, etc. + pView->SetSortColumn(sortColumnIndex); } } diff --git a/clientgui/mac/MacAccessiblity.mm b/clientgui/mac/MacAccessiblity.mm index 2d4efc7688..8a00b01659 100644 --- a/clientgui/mac/MacAccessiblity.mm +++ b/clientgui/mac/MacAccessiblity.mm @@ -226,7 +226,7 @@ static void wxRectToNSRect(wxRect &wxr, NSRect &nsr) { if (isHeader) { int numCols = pList->GetColumnCount(); if ((!isEventLog) && (BOINCView != nil)) { - if (col == BOINCView->m_iSortColumn) { + if (col == BOINCView->m_iColumnIDToColumnIndex[BOINCView->m_iSortColumnID]) { isCurrentSortCol = YES; } } @@ -327,7 +327,7 @@ static void wxRectToNSRect(wxRect &wxr, NSRect &nsr) { return NSAccessibilitySortButtonRole; } else if ([attribute isEqualToString:NSAccessibilitySortDirectionAttribute]) { - if (col == BOINCView->m_iSortColumn) { + if (col == BOINCView->m_iColumnIDToColumnIndex[BOINCView->m_iSortColumnID]) { return BOINCView->m_bReverseSort ? NSAccessibilityDescendingSortDirectionValue : NSAccessibilityAscendingSortDirectionValue; } else {