From 77643fe9b6ef8e3c57c351ebb07ac40a74a75232 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sat, 15 Jun 2019 10:08:36 -0700 Subject: [PATCH] pcbnew: Restore select items filter This restores the distinction between selecting tracks and selecting items in the expand call. It does not yet fully address lp:1832902 --- pcbnew/tools/selection_tool.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d5dcb065ad..15005e8fe6 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -863,7 +863,13 @@ int SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent ) // Track items marked BUSY have already been visited // therefore their connections have already been marked if( trackItem && !trackItem->GetState( BUSY ) ) - selectAllItemsConnectedToItem( *trackItem ); + { + if( aEvent.GetCommandId() + && *aEvent.GetCommandId() == PCB_ACTIONS::expandSelectedConnection.GetId() ) + selectAllItemsConnectedToItem( *trackItem ); + else + selectAllItemsConnectedToTrack( *trackItem ); + } } // Inform other potentially interested tools