From 5545dfd02b036a58c0719de44b16dc03578ff169 Mon Sep 17 00:00:00 2001 From: John Beard Date: Sat, 26 Oct 2024 17:38:35 +0800 Subject: [PATCH] Incrementing: add some types to selection filters --- eeschema/tools/symbol_editor_edit_tool.cpp | 2 +- pcbnew/tools/edit_tool.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/eeschema/tools/symbol_editor_edit_tool.cpp b/eeschema/tools/symbol_editor_edit_tool.cpp index 4fcaa77d4e..d76290417f 100644 --- a/eeschema/tools/symbol_editor_edit_tool.cpp +++ b/eeschema/tools/symbol_editor_edit_tool.cpp @@ -1097,7 +1097,7 @@ int SYMBOL_EDITOR_EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent ) int SYMBOL_EDITOR_EDIT_TOOL::Increment( const TOOL_EVENT& aEvent ) { const ACTIONS::INCREMENT incParam = aEvent.Parameter(); - EE_SELECTION& selection = m_selectionTool->RequestSelection( { SCH_PIN_T } ); + EE_SELECTION& selection = m_selectionTool->RequestSelection( { SCH_PIN_T, SCH_TEXT_T } ); if( selection.Empty() ) return 0; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5faf419872..5bfded88a8 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -2969,8 +2969,15 @@ int EDIT_TOOL::Increment( const TOOL_EVENT& aEvent ) { for( int i = aCollector.GetCount() - 1; i >= 0; i-- ) { - if( aCollector[i]->Type() != PCB_PAD_T ) + switch( aCollector[i]->Type() ) + { + case PCB_PAD_T: + case PCB_TEXT_T: + break; + default: aCollector.Remove( i ); + break; + } } };