Fix edge case in re-enabling auto track width

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9887
This commit is contained in:
Jon Evans 2021-12-09 18:07:05 -05:00
parent 70841c6393
commit 196571d004
1 changed files with 13 additions and 3 deletions

View File

@ -109,10 +109,20 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event )
switch( id )
{
case ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH:
GetDesignSettings().m_UseConnectedTrackWidth =
not GetDesignSettings().m_UseConnectedTrackWidth;
GetDesignSettings().UseCustomTrackViaSize( false );
{
if( GetDesignSettings().UseCustomTrackViaSize() )
{
GetDesignSettings().UseCustomTrackViaSize( false );
GetDesignSettings().m_UseConnectedTrackWidth = true;
}
else
{
GetDesignSettings().m_UseConnectedTrackWidth =
not GetDesignSettings().m_UseConnectedTrackWidth;
}
break;
}
case ID_POPUP_PCB_SELECT_USE_NETCLASS_VALUES:
GetDesignSettings().m_UseConnectedTrackWidth = false;