Unify our breakTracks routines
Fixes https://gitlab.com/kicad/code/kicad/issues/9793
This commit is contained in:
parent
0570c22732
commit
4b226b8172
|
@ -1428,6 +1428,7 @@ int ROUTER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
updateStartItem( *evt, true );
|
||||
breakTrack( );
|
||||
evt->SetPassEvent( false );
|
||||
}
|
||||
else if( evt->IsClick( BUT_LEFT )
|
||||
|| evt->IsAction( &PCB_ACTIONS::routeSingleTrack )
|
||||
|
@ -2109,7 +2110,7 @@ void ROUTER_TOOL::setTransitions()
|
|||
Go( &ROUTER_TOOL::ChangeRouterMode, PCB_ACTIONS::routerWalkaroundMode.MakeEvent() );
|
||||
Go( &ROUTER_TOOL::CycleRouterMode, PCB_ACTIONS::cycleRouterMode.MakeEvent() );
|
||||
Go( &ROUTER_TOOL::InlineDrag, PCB_ACTIONS::routerInlineDrag.MakeEvent() );
|
||||
Go( &ROUTER_TOOL::InlineBreakTrack, PCB_ACTIONS::inlineBreakTrack.MakeEvent() );
|
||||
Go( &ROUTER_TOOL::InlineBreakTrack, PCB_ACTIONS::breakTrack.MakeEvent() );
|
||||
|
||||
Go( &ROUTER_TOOL::onViaCommand, ACT_PlaceThroughVia.MakeEvent() );
|
||||
Go( &ROUTER_TOOL::onViaCommand, ACT_PlaceBlindVia.MakeEvent() );
|
||||
|
|
|
@ -164,7 +164,7 @@ bool EDIT_TOOL::Init()
|
|||
|
||||
menu.AddItem( PCB_ACTIONS::move, SELECTION_CONDITIONS::NotEmpty
|
||||
&& notMovingCondition );
|
||||
menu.AddItem( PCB_ACTIONS::inlineBreakTrack, SELECTION_CONDITIONS::Count( 1 )
|
||||
menu.AddItem( PCB_ACTIONS::breakTrack, SELECTION_CONDITIONS::Count( 1 )
|
||||
&& SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::Tracks ) );
|
||||
menu.AddItem( PCB_ACTIONS::drag45Degree, SELECTION_CONDITIONS::Count( 1 )
|
||||
&& SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::DraggableItems ) );
|
||||
|
|
|
@ -1381,12 +1381,6 @@ TOOL_ACTION PCB_ACTIONS::routerUndoLastSegment( "pcbnew.InteractiveRouter.UndoLa
|
|||
WXK_BACK, "",
|
||||
_( "Undo Last Segment" ), _( "Walks the current track back one segment." ) );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::inlineBreakTrack( "pcbnew.InteractiveRouter.InlineBreakTrack",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Break Track" ),
|
||||
_( "Splits the track segment into two segments connected at the cursor position." ),
|
||||
BITMAPS::break_line );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::breakTrack( "pcbnew.InteractiveRouter.BreakTrack",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Break Track" ),
|
||||
|
|
|
@ -131,9 +131,6 @@ public:
|
|||
/// Break a single track into two segments at the cursor
|
||||
static TOOL_ACTION breakTrack;
|
||||
|
||||
/// Breaks track when router is not activated
|
||||
static TOOL_ACTION inlineBreakTrack;
|
||||
|
||||
static TOOL_ACTION drag45Degree;
|
||||
static TOOL_ACTION dragFreeAngle;
|
||||
|
||||
|
|
Loading…
Reference in New Issue