Commit 917e4739 authored by Maciej Suminski's avatar Maciej Suminski

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

parent ffe212ea
......@@ -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,
......
......@@ -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",
......
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment