From 3ea766154bd366e6c9f962450855bebb223eff5a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 22 Jan 2019 22:33:00 -0800 Subject: [PATCH] eeschema: Allow tree expand/collapse with +/- --- common/widgets/lib_tree.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index 27bbe28c5d..32d605255f 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -327,6 +327,18 @@ void LIB_TREE::onQueryCharHook( wxKeyEvent& aKeyStroke ) selectIfValid( GetNextItem( *m_tree_ctrl, sel ) ); break; + case WXK_ADD: + if( type == LIB_TREE_NODE::LIB ) + m_tree_ctrl->Expand( sel ); + + break; + + case WXK_SUBTRACT: + if( type == LIB_TREE_NODE::LIB ) + m_tree_ctrl->Collapse( sel ); + + break; + case WXK_RETURN: if( type == LIB_TREE_NODE::LIB ) {