Custom track/via size settings nicely cooperate with other options.

This commit is contained in:
Maciej Suminski 2014-05-13 11:22:51 +02:00
parent ffe212ea5e
commit 917e47397d
4 changed files with 16 additions and 0 deletions

View File

@ -170,6 +170,7 @@ enum pcbnew_ids
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
ID_POPUP_PCB_SELECT_WIDTH_START_RANGE,
ID_POPUP_PCB_SELECT_WIDTH,
ID_POPUP_PCB_SELECT_CUSTOM,
ID_POPUP_PCB_SELECT_AUTO_WIDTH,
ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES,
ID_POPUP_PCB_SELECT_WIDTH1,

View File

@ -241,6 +241,7 @@ TOOL_ACTION COMMON_ACTIONS::viaSizeDec( "pcbnew.viaSizeDec",
AS_GLOBAL, '\\',
"", "" );
TOOL_ACTION COMMON_ACTIONS::trackViaSizeChanged( "pcbnew.trackViaSizeChanged", AS_GLOBAL, 0, "", "" );
// Miscellaneous
TOOL_ACTION COMMON_ACTIONS::resetCoords( "pcbnew.resetCoords",

View File

@ -137,6 +137,8 @@ public:
static TOOL_ACTION viaSizeInc;
static TOOL_ACTION viaSizeDec;
static TOOL_ACTION trackViaSizeChanged; // notification
// Miscellaneous
static TOOL_ACTION resetCoords;
static TOOL_ACTION switchUnits;

View File

@ -422,11 +422,14 @@ int PCBNEW_CONTROL::TrackWidthInc( TOOL_EVENT& aEvent )
widthIndex = board->m_TrackWidthList.size() - 1;
board->SetTrackWidthIndex( widthIndex );
board->UseCustomTrackViaSize( false );
wxUpdateUIEvent dummy;
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectTrackWidth( dummy );
setTransitions();
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
return 0;
}
@ -440,11 +443,14 @@ int PCBNEW_CONTROL::TrackWidthDec( TOOL_EVENT& aEvent )
widthIndex = 0;
board->SetTrackWidthIndex( widthIndex );
board->UseCustomTrackViaSize( false );
wxUpdateUIEvent dummy;
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectTrackWidth( dummy );
setTransitions();
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
return 0;
}
@ -458,11 +464,14 @@ int PCBNEW_CONTROL::ViaSizeInc( TOOL_EVENT& aEvent )
sizeIndex = board->m_ViasDimensionsList.size() - 1;
board->SetViaSizeIndex( sizeIndex );
board->UseCustomTrackViaSize( false );
wxUpdateUIEvent dummy;
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectViaSize( dummy );
setTransitions();
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
return 0;
}
@ -476,11 +485,14 @@ int PCBNEW_CONTROL::ViaSizeDec( TOOL_EVENT& aEvent )
sizeIndex = 0;
board->SetViaSizeIndex( sizeIndex );
board->UseCustomTrackViaSize( false );
wxUpdateUIEvent dummy;
getEditFrame<PCB_EDIT_FRAME>()->OnUpdateSelectViaSize( dummy );
setTransitions();
m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged );
return 0;
}