Add length tuning menu to vertical pcb toolbar

This commit is contained in:
david-beinder 2021-05-07 15:44:47 +02:00 committed by Jon Evans
parent 2a856890e6
commit 34145d8170
3 changed files with 17 additions and 4 deletions

View File

@ -723,7 +723,10 @@ void PCB_EDIT_FRAME::setupUIConditions()
CURRENT_EDIT_TOOL( ACTIONS::deleteTool );
CURRENT_EDIT_TOOL( PCB_ACTIONS::placeFootprint );
CURRENT_EDIT_TOOL( PCB_ACTIONS::routeSingleTrack);
CURRENT_EDIT_TOOL( PCB_ACTIONS::routeDiffPair);
CURRENT_EDIT_TOOL( PCB_ACTIONS::routeDiffPair );
CURRENT_EDIT_TOOL( PCB_ACTIONS::routerTuneDiffPair );
CURRENT_EDIT_TOOL( PCB_ACTIONS::routerTuneDiffPairSkew );
CURRENT_EDIT_TOOL( PCB_ACTIONS::routerTuneSingleTrace );
CURRENT_EDIT_TOOL( PCB_ACTIONS::drawVia );
CURRENT_EDIT_TOOL( PCB_ACTIONS::drawZone );
CURRENT_EDIT_TOOL( PCB_ACTIONS::drawRuleArea );

View File

@ -395,6 +395,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
static ACTION_GROUP* dimensionGroup = nullptr;
static ACTION_GROUP* originGroup = nullptr;
static ACTION_GROUP* routingGroup = nullptr;
static ACTION_GROUP* tuneGroup = nullptr;
static ACTION_GROUP* microwaveGroup = nullptr;
if( !dimensionGroup )
@ -420,6 +421,14 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
&PCB_ACTIONS::routeDiffPair } );
}
if( !tuneGroup )
{
tuneGroup = new ACTION_GROUP( "group.pcbTune",
{ &PCB_ACTIONS::routerTuneSingleTrace,
&PCB_ACTIONS::routerTuneDiffPair,
&PCB_ACTIONS::routerTuneDiffPairSkew } );
}
if( !microwaveGroup )
{
microwaveGroup = new ACTION_GROUP( "group.pcbMicrowave",
@ -437,6 +446,7 @@ void PCB_EDIT_FRAME::ReCreateVToolbar()
m_drawToolBar->AddScaledSeparator( this );
m_drawToolBar->Add( PCB_ACTIONS::placeFootprint, ACTION_TOOLBAR::TOGGLE );
m_drawToolBar->AddGroup( routingGroup, ACTION_TOOLBAR::TOGGLE );
m_drawToolBar->AddGroup( tuneGroup, ACTION_TOOLBAR::TOGGLE );
m_drawToolBar->Add( PCB_ACTIONS::drawVia, ACTION_TOOLBAR::TOGGLE );
m_drawToolBar->AddGroup( microwaveGroup, ACTION_TOOLBAR::TOGGLE );
m_drawToolBar->Add( PCB_ACTIONS::drawZone, ACTION_TOOLBAR::TOGGLE );

View File

@ -1307,21 +1307,21 @@ TOOL_ACTION PCB_ACTIONS::routerTuneSingleTrace( "pcbnew.LengthTuner.TuneSingleTr
AS_GLOBAL,
// Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
'7', LEGACY_HK_NAME( "Tune Single Track (Modern Toolset only)" ),
_( "Tune length of a single track" ), "",
_( "Tune length of a single track" ), _( "Tune length of a single track" ),
BITMAPS::ps_tune_length, AF_ACTIVATE, (void*) PNS::PNS_MODE_TUNE_SINGLE );
TOOL_ACTION PCB_ACTIONS::routerTuneDiffPair( "pcbnew.LengthTuner.TuneDiffPair",
AS_GLOBAL,
// Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
'8', LEGACY_HK_NAME( "Tune Differential Pair Length (Modern Toolset only)" ),
_( "Tune length of a differential pair" ), "",
_( "Tune length of a differential pair" ), _( "Tune length of a differential pair" ),
BITMAPS::ps_diff_pair_tune_length, AF_ACTIVATE, (void*) PNS::PNS_MODE_TUNE_DIFF_PAIR );
TOOL_ACTION PCB_ACTIONS::routerTuneDiffPairSkew( "pcbnew.LengthTuner.TuneDiffPairSkew",
AS_GLOBAL,
// Don't be tempted to remove "Modern Toolset only". It's in the legacy property name.
'9', LEGACY_HK_NAME( "Tune Differential Pair Skew (Modern Toolset only)" ),
_( "Tune skew of a differential pair" ), "",
_( "Tune skew of a differential pair" ), _( "Tune skew of a differential pair" ),
BITMAPS::ps_diff_pair_tune_phase, AF_ACTIVATE, (void*) PNS::PNS_MODE_TUNE_DIFF_PAIR_SKEW );
TOOL_ACTION PCB_ACTIONS::routerInlineDrag( "pcbnew.InteractiveRouter.InlineDrag",