Custom track/via size settings nicely cooperate with other options.
This commit is contained in:
parent
ffe212ea5e
commit
917e47397d
|
@ -170,6 +170,7 @@ enum pcbnew_ids
|
||||||
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
|
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
|
||||||
ID_POPUP_PCB_SELECT_WIDTH_START_RANGE,
|
ID_POPUP_PCB_SELECT_WIDTH_START_RANGE,
|
||||||
ID_POPUP_PCB_SELECT_WIDTH,
|
ID_POPUP_PCB_SELECT_WIDTH,
|
||||||
|
ID_POPUP_PCB_SELECT_CUSTOM,
|
||||||
ID_POPUP_PCB_SELECT_AUTO_WIDTH,
|
ID_POPUP_PCB_SELECT_AUTO_WIDTH,
|
||||||
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES,
|
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES,
|
||||||
ID_POPUP_PCB_SELECT_WIDTH1,
|
ID_POPUP_PCB_SELECT_WIDTH1,
|
||||||
|
|
|
@ -241,6 +241,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.viaSizeDec",
|
||||||
AS_GLOBAL, '\\',
|
AS_GLOBAL, '\\',
|
||||||
"", "" );
|
"", "" );
|
||||||
|
|
||||||
|
TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.trackViaSizeChanged", AS_GLOBAL, 0, "", "" );
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords",
|
TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords",
|
||||||
|
|
|
@ -137,6 +137,8 @@ public:
|
||||||
static TOOL_ACTION viaSizeInc;
|
static TOOL_ACTION viaSizeInc;
|
||||||
static TOOL_ACTION viaSizeDec;
|
static TOOL_ACTION viaSizeDec;
|
||||||
|
|
||||||
|
static TOOL_ACTION trackViaSizeChanged; // notification
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
static TOOL_ACTION resetCoords;
|
static TOOL_ACTION resetCoords;
|
||||||
static TOOL_ACTION switchUnits;
|
static TOOL_ACTION switchUnits;
|
||||||
|
|
|
@ -422,11 +422,14 @@ int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent )
|
||||||
widthIndex = board->m_TrackWidthList.size() - 1;
|
widthIndex = board->m_TrackWidthList.size() - 1;
|
||||||
|
|
||||||
board->SetTrackWidthIndex( widthIndex );
|
board->SetTrackWidthIndex( widthIndex );
|
||||||
|
board->UseCustomTrackViaSize( false );
|
||||||
|
|
||||||
wxUpdateUIEvent dummy;
|
wxUpdateUIEvent dummy;
|
||||||
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectTrackWidth( dummy );
|
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectTrackWidth( dummy );
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
|
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -440,11 +443,14 @@ int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent )
|
||||||
widthIndex = 0;
|
widthIndex = 0;
|
||||||
|
|
||||||
board->SetTrackWidthIndex( widthIndex );
|
board->SetTrackWidthIndex( widthIndex );
|
||||||
|
board->UseCustomTrackViaSize( false );
|
||||||
|
|
||||||
wxUpdateUIEvent dummy;
|
wxUpdateUIEvent dummy;
|
||||||
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectTrackWidth( dummy );
|
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectTrackWidth( dummy );
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
|
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,11 +464,14 @@ int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent )
|
||||||
sizeIndex = board->m_ViasDimensionsList.size() - 1;
|
sizeIndex = board->m_ViasDimensionsList.size() - 1;
|
||||||
|
|
||||||
board->SetViaSizeIndex( sizeIndex );
|
board->SetViaSizeIndex( sizeIndex );
|
||||||
|
board->UseCustomTrackViaSize( false );
|
||||||
|
|
||||||
wxUpdateUIEvent dummy;
|
wxUpdateUIEvent dummy;
|
||||||
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectViaSize( dummy );
|
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectViaSize( dummy );
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
|
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,11 +485,14 @@ int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent )
|
||||||
sizeIndex = 0;
|
sizeIndex = 0;
|
||||||
|
|
||||||
board->SetViaSizeIndex( sizeIndex );
|
board->SetViaSizeIndex( sizeIndex );
|
||||||
|
board->UseCustomTrackViaSize( false );
|
||||||
|
|
||||||
wxUpdateUIEvent dummy;
|
wxUpdateUIEvent dummy;
|
||||||
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectViaSize( dummy );
|
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectViaSize( dummy );
|
||||||
setTransitions();
|
setTransitions();
|
||||||
|
|
||||||
|
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue