Update status bar and toolbars on language change.

Fixes: lp:1392582
* https://bugs.launchpad.net/kicad/+bug/1392582

Fixes: lp:1748428
* https://bugs.launchpad.net/kicad/+bug/1748428
This commit is contained in:
Jeff Young 2018-02-03 22:55:13 +00:00
parent 89ebab5df2
commit aa0ae48dda
8 changed files with 45 additions and 7 deletions

View File

@ -954,6 +954,14 @@ void CVPCB_MAINFRAME::OnConfigurePaths( wxCommandEvent& aEvent )
}
void CVPCB_MAINFRAME::ShowChangedLanguage()
{
EDA_BASE_FRAME::ShowChangedLanguage();
ReCreateHToolbar();
DisplayStatus();
}
void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
{
const std::string& payload = mail.GetPayload();

View File

@ -116,6 +116,7 @@ public:
void OnSize( wxSizeEvent& SizeEvent );
void ReCreateHToolbar();
virtual void ReCreateMenuBar() override;
void ShowChangedLanguage() override;
void ChangeFocus( bool aMoveRight );

View File

@ -54,7 +54,7 @@ public:
void ReCreateHToolbar() override;
void ReCreateVToolbar() override;
void ReCreateOptToolbar();
void ReCreateOptToolbar() override;
void RecreateMenuBar();
void OnSelectOptionToolbar( wxCommandEvent& event );

View File

@ -187,11 +187,11 @@ public:
// General
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override { }
virtual void ReCreateHToolbar() override = 0;
virtual void ReCreateVToolbar() override = 0;
virtual void ReCreateOptToolbar() { }
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override = 0;
virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) override = 0;
virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) override = 0;
virtual void ShowChangedLanguage() override;
virtual void ReCreateMenuBar() override;
virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ) override;
virtual void UpdateStatusBar() override;

View File

@ -102,7 +102,7 @@ public:
void ReCreateHToolbar() override;
void ReCreateVToolbar() override;
void ReCreateOptToolbar();
void ReCreateOptToolbar() override;
void ReCreateAuxiliaryToolbar() override;
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;

View File

@ -386,6 +386,22 @@ void PCB_BASE_FRAME::ReCreateMenuBar( void )
}
void PCB_BASE_FRAME::ShowChangedLanguage()
{
// call my base class
EDA_DRAW_FRAME::ShowChangedLanguage();
// tooltips in toolbars
ReCreateHToolbar();
ReCreateAuxiliaryToolbar();
ReCreateVToolbar();
ReCreateOptToolbar();
// status bar
UpdateMsgPanel();
}
// Virtual functions: Do nothing for PCB_BASE_FRAME window
void PCB_BASE_FRAME::Show3D_Frame( wxCommandEvent& event )
{

View File

@ -1032,13 +1032,26 @@ void PCB_EDIT_FRAME::ShowChangedLanguage()
// call my base class
PCB_BASE_FRAME::ShowChangedLanguage();
m_Layers->SetLayersManagerTabsText();
// update the layer manager
m_Layers->Freeze();
wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers );
pane_info.Caption( _( "Visibles" ) );
m_auimgr.Update();
m_Layers->SetLayersManagerTabsText();
ReFillLayerWidget();
m_Layers->ReFillRender();
// upate the layer widget to match board visibility states, both layers and render columns.
syncLayerVisibilities();
syncLayerWidgetLayer();
syncRenderStates();
m_Layers->Thaw();
// pcbnew-specific toolbars
ReCreateMicrowaveVToolbar();
}

View File

@ -581,7 +581,7 @@ public:
void ReCreateAuxiliaryToolbar() override;
void ReCreateVToolbar() override;
void ReCreateMicrowaveVToolbar();
void ReCreateOptToolbar();
void ReCreateOptToolbar() override;
void ReCreateMenuBar() override;
/**