diff --git a/pcbnew/generators/pcb_tuning_pattern.cpp b/pcbnew/generators/pcb_tuning_pattern.cpp index 75245da07a..e6dc5a6895 100644 --- a/pcbnew/generators/pcb_tuning_pattern.cpp +++ b/pcbnew/generators/pcb_tuning_pattern.cpp @@ -653,9 +653,6 @@ PCB_TUNING_PATTERN* PCB_TUNING_PATTERN::CreateNew( GENERATOR_TOOL* aTool, DRC_CONSTRAINT constraint; PCB_LAYER_ID layer = aStartItem->GetLayer(); - if( aMode == SINGLE && board->DpCoupledNet( aStartItem->GetNet() ) ) - aMode = DIFF_PAIR; - PCB_TUNING_PATTERN* pattern = new PCB_TUNING_PATTERN( board, layer, aMode ); switch( aMode ) diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp index 1b92e2e195..9aada1ef59 100644 --- a/pcbnew/menubar_pcb_editor.cpp +++ b/pcbnew/menubar_pcb_editor.cpp @@ -356,7 +356,8 @@ void PCB_EDIT_FRAME::doReCreateMenuBar() routeMenu->Add( PCB_ACTIONS::routeDiffPair ); routeMenu->AppendSeparator(); - routeMenu->Add( PCB_ACTIONS::tuneLength ); + routeMenu->Add( PCB_ACTIONS::tuneSingleTrack ); + routeMenu->Add( PCB_ACTIONS::tuneDiffPair ); routeMenu->Add( PCB_ACTIONS::tuneSkew ); routeMenu->AppendSeparator(); diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 4606095ec2..78ef6c9a81 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -954,7 +954,8 @@ void PCB_EDIT_FRAME::setupUIConditions() CURRENT_EDIT_TOOL( PCB_ACTIONS::placeFootprint ); CURRENT_EDIT_TOOL( PCB_ACTIONS::routeSingleTrack); CURRENT_EDIT_TOOL( PCB_ACTIONS::routeDiffPair ); - CURRENT_EDIT_TOOL( PCB_ACTIONS::tuneLength ); + CURRENT_EDIT_TOOL( PCB_ACTIONS::tuneSingleTrack); + CURRENT_EDIT_TOOL( PCB_ACTIONS::tuneDiffPair ); CURRENT_EDIT_TOOL( PCB_ACTIONS::tuneSkew ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawVia ); CURRENT_EDIT_TOOL( PCB_ACTIONS::drawZone ); diff --git a/pcbnew/toolbars_pcb_editor.cpp b/pcbnew/toolbars_pcb_editor.cpp index 419038180c..6a1e5d836d 100644 --- a/pcbnew/toolbars_pcb_editor.cpp +++ b/pcbnew/toolbars_pcb_editor.cpp @@ -416,7 +416,8 @@ void PCB_EDIT_FRAME::ReCreateVToolbar() if( !tuneGroup ) { tuneGroup = new ACTION_GROUP( "group.pcbTune", - { &PCB_ACTIONS::tuneLength, + { &PCB_ACTIONS::tuneSingleTrack, + &PCB_ACTIONS::tuneDiffPair, &PCB_ACTIONS::tuneSkew } ); } diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index bd6c41f34e..94fcbdac1e 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -3443,6 +3443,7 @@ void DRAWING_TOOL::setTransitions() Go( &DRAWING_TOOL::ToggleHV45Mode, PCB_ACTIONS::toggleHV45Mode.MakeEvent() ); - Go( &DRAWING_TOOL::PlaceTuningPattern, PCB_ACTIONS::tuneLength.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTuningPattern, PCB_ACTIONS::tuneSingleTrack.MakeEvent() ); + Go( &DRAWING_TOOL::PlaceTuningPattern, PCB_ACTIONS::tuneDiffPair.MakeEvent() ); Go( &DRAWING_TOOL::PlaceTuningPattern, PCB_ACTIONS::tuneSkew.MakeEvent() ); } diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index 4e7b331290..c5383c79a0 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -2294,19 +2294,30 @@ TOOL_ACTION PCB_ACTIONS::selectLayerPair( TOOL_ACTION_ARGS() .Icon( BITMAPS::select_layer_pair ) .Flags( AF_ACTIVATE ) ); -TOOL_ACTION PCB_ACTIONS::tuneLength( TOOL_ACTION_ARGS() +TOOL_ACTION PCB_ACTIONS::tuneSingleTrack( TOOL_ACTION_ARGS() .Name( "pcbnew.LengthTuner.TuneSingleTrack" ) .Scope( AS_GLOBAL ) .DefaultHotkey( '7' ) - .DefaultHotkeyAlt( '8' ) // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name. .LegacyHotkeyName( "Tune Single Track (Modern Toolset only)" ) - .FriendlyName( _( "Tune Length" ) ) - .Tooltip( _( "Tune length of a single track or differential pair" ) ) + .FriendlyName( _( "Tune length of a single track" ) ) + .Tooltip( _( "Tune length of a single track" ) ) .Icon( BITMAPS::ps_tune_length ) .Flags( AF_ACTIVATE ) .Parameter( PNS::PNS_MODE_TUNE_SINGLE ) ); +TOOL_ACTION PCB_ACTIONS::tuneDiffPair( TOOL_ACTION_ARGS() + .Name( "pcbnew.LengthTuner.TuneDiffPair" ) + .Scope( AS_GLOBAL ) + .DefaultHotkey( '8' ) + // Don't be tempted to remove "Modern Toolset only". It's in the legacy property name. + .LegacyHotkeyName( "Tune Differential Pair Length (Modern Toolset only)" ) + .FriendlyName( _( "Tune length of a differential pair" ) ) + .Tooltip( _( "Tune length of a differential pair" ) ) + .Icon( BITMAPS::ps_diff_pair_tune_length ) + .Flags( AF_ACTIVATE ) + .Parameter( PNS::PNS_MODE_TUNE_DIFF_PAIR ) ); + TOOL_ACTION PCB_ACTIONS::tuneSkew( TOOL_ACTION_ARGS() .Name( "pcbnew.LengthTuner.TuneDiffPairSkew" ) .Scope( AS_GLOBAL ) diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index f8c8e5bd75..86686d3913 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -244,7 +244,8 @@ public: /// Activation of the Push and Shove router (differential pair mode) static TOOL_ACTION routeDiffPair; - static TOOL_ACTION tuneLength; + static TOOL_ACTION tuneSingleTrack; + static TOOL_ACTION tuneDiffPair; static TOOL_ACTION tuneSkew; static TOOL_ACTION routerUndoLastSegment;