Incrementing: add some types to selection filters

This commit is contained in:
John Beard
2024-10-26 17:56:32 +08:00
parent 0278c13018
commit 5545dfd02b
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -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<ACTIONS::INCREMENT>();
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;
+8 -1
View File
@@ -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;
}
}
};