Update toolbars when changing units.

Fixes: lp:4249
* https://bugs.launchpad.net/kicad/+bug/4249
This commit is contained in:
Jeff Young 2020-04-22 23:14:42 +01:00
parent f61c692929
commit 36d716bb50
3 changed files with 8 additions and 0 deletions

View File

@ -268,6 +268,7 @@ bool EDA_DRAW_FRAME::LockFile( const wxString& aFileName )
void EDA_DRAW_FRAME::unitsChangeRefresh()
{
ReCreateAuxiliaryToolbar();
UpdateStatusBar();
UpdateMsgPanel();
}
@ -298,6 +299,8 @@ void EDA_DRAW_FRAME::CommonSettingsChanged()
m_canvas->SetEnableAutoPan( option );
m_galDisplayOptions.ReadCommonConfig( *settings, this );
ReCreateAuxiliaryToolbar();
}
@ -428,6 +431,7 @@ void EDA_DRAW_FRAME::OnUpdateUnits( wxUpdateUIEvent& aEvent )
aEvent.Check( enable );
DisplayUnitsMsg();
ReCreateAuxiliaryToolbar();
}

View File

@ -271,6 +271,7 @@ bool EDA_DRAW_FRAME::LockFile( const wxString& aFileName )
void EDA_DRAW_FRAME::unitsChangeRefresh()
{
ReCreateAuxiliaryToolbar();
UpdateStatusBar();
UpdateMsgPanel();
}
@ -300,6 +301,8 @@ void EDA_DRAW_FRAME::CommonSettingsChanged()
m_canvas->SetEnableAutoPan( option );
m_galDisplayOptions.ReadCommonConfig( *settings, this );
ReCreateAuxiliaryToolbar();
}

View File

@ -574,6 +574,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
{
UpdateTrackWidthSelectBox( m_SelTrackWidthBox );
UpdateViaSizeSelectBox( m_SelViaSizeBox );
UpdateGridSelectBox();
// combobox sizes can have changed: apply new best sizes
wxAuiToolBarItem* item = m_auxiliaryToolBar->FindTool( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH );