diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 0ceb7ccde8..421aad1e70 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -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, diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 3ff65af56b..539de05ceb 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -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", diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h index 38569af29a..671a509699 100644 --- a/pcbnew/tools/common_actions.h +++ b/pcbnew/tools/common_actions.h @@ -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; diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index ec8b086bab..378ae9a580 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -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()->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()->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()->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()->OnUpdateSelectViaSize( dummy ); setTransitions(); + m_toolMgr->RunAction( COMMON_ACTIONS::trackViaSizeChanged ); + return 0; }