Browse Source

Incrementing: add some types to selection filters

pcb_db
John Beard 12 months ago
parent
commit
5545dfd02b
  1. 2
      eeschema/tools/symbol_editor_edit_tool.cpp
  2. 9
      pcbnew/tools/edit_tool.cpp

2
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<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;

9
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;
}
}
};

Loading…
Cancel
Save