From 7f9876ec27c75f45d1b246aadf5459a6b6b7658b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 20 Dec 2017 14:48:13 +0100 Subject: [PATCH] Fix lexical sort in component tree widget on Windows Apparently explicitly requesting a column to be sorted breaks component filtering on Windows. Without SetSortOrder() call the list is sorted and filtering still works as expected. Fixes: lp:1739412 * https://bugs.launchpad.net/kicad/+bug/1739412 --- eeschema/cmp_tree_model_adapter_base.cpp | 4 ---- eeschema/widgets/component_tree.cpp | 8 -------- 2 files changed, 12 deletions(-) diff --git a/eeschema/cmp_tree_model_adapter_base.cpp b/eeschema/cmp_tree_model_adapter_base.cpp index 2d59d15921..3e4293f501 100644 --- a/eeschema/cmp_tree_model_adapter_base.cpp +++ b/eeschema/cmp_tree_model_adapter_base.cpp @@ -189,10 +189,6 @@ void CMP_TREE_MODEL_ADAPTER_BASE::AttachTo( wxDataViewCtrl* aDataViewCtrl ) ColWidth( m_tree, 0, part_head ) ); m_col_desc = aDataViewCtrl->AppendTextColumn( desc_head, 1, wxDATAVIEW_CELL_INERT, ColWidth( m_tree, 1, desc_head ) ); - - // Enabling sort order breaks node selection on Windows, so unfortunately the list - // stays sorted in inverted lexical order. On Linux it does not change anything. - m_col_part->SetSortOrder( 0 ); } diff --git a/eeschema/widgets/component_tree.cpp b/eeschema/widgets/component_tree.cpp index aca974d407..54524075cf 100644 --- a/eeschema/widgets/component_tree.cpp +++ b/eeschema/widgets/component_tree.cpp @@ -253,19 +253,11 @@ void COMPONENT_TREE::onQueryCharHook( wxKeyEvent& aKeyStroke ) switch( aKeyStroke.GetKeyCode() ) { -#ifndef __WINDOWS__ case WXK_UP: -#else - case WXK_DOWN: -#endif selectIfValid( GetPrevItem( *m_tree_ctrl, sel ) ); break; -#ifndef __WINDOWS__ case WXK_DOWN: -#else - case WXK_UP: -#endif selectIfValid( GetNextItem( *m_tree_ctrl, sel ) ); break;