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:
parent
89ebab5df2
commit
aa0ae48dda
|
@ -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 )
|
void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
|
||||||
{
|
{
|
||||||
const std::string& payload = mail.GetPayload();
|
const std::string& payload = mail.GetPayload();
|
||||||
|
|
|
@ -116,6 +116,7 @@ public:
|
||||||
void OnSize( wxSizeEvent& SizeEvent );
|
void OnSize( wxSizeEvent& SizeEvent );
|
||||||
void ReCreateHToolbar();
|
void ReCreateHToolbar();
|
||||||
virtual void ReCreateMenuBar() override;
|
virtual void ReCreateMenuBar() override;
|
||||||
|
void ShowChangedLanguage() override;
|
||||||
|
|
||||||
void ChangeFocus( bool aMoveRight );
|
void ChangeFocus( bool aMoveRight );
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
|
|
||||||
void ReCreateHToolbar() override;
|
void ReCreateHToolbar() override;
|
||||||
void ReCreateVToolbar() override;
|
void ReCreateVToolbar() override;
|
||||||
void ReCreateOptToolbar();
|
void ReCreateOptToolbar() override;
|
||||||
void RecreateMenuBar();
|
void RecreateMenuBar();
|
||||||
|
|
||||||
void OnSelectOptionToolbar( wxCommandEvent& event );
|
void OnSelectOptionToolbar( wxCommandEvent& event );
|
||||||
|
|
|
@ -187,11 +187,11 @@ public:
|
||||||
// General
|
// General
|
||||||
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
|
virtual void OnCloseWindow( wxCloseEvent& Event ) = 0;
|
||||||
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override { }
|
virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) override { }
|
||||||
virtual void ReCreateHToolbar() override = 0;
|
virtual void ReCreateOptToolbar() { }
|
||||||
virtual void ReCreateVToolbar() override = 0;
|
|
||||||
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override = 0;
|
virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override = 0;
|
||||||
virtual void OnLeftDClick( 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 bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) override = 0;
|
||||||
|
virtual void ShowChangedLanguage() override;
|
||||||
virtual void ReCreateMenuBar() override;
|
virtual void ReCreateMenuBar() override;
|
||||||
virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ) override;
|
virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg ) override;
|
||||||
virtual void UpdateStatusBar() override;
|
virtual void UpdateStatusBar() override;
|
||||||
|
|
|
@ -102,7 +102,7 @@ public:
|
||||||
void ReCreateHToolbar() override;
|
void ReCreateHToolbar() override;
|
||||||
|
|
||||||
void ReCreateVToolbar() override;
|
void ReCreateVToolbar() override;
|
||||||
void ReCreateOptToolbar();
|
void ReCreateOptToolbar() override;
|
||||||
void ReCreateAuxiliaryToolbar() override;
|
void ReCreateAuxiliaryToolbar() override;
|
||||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
|
void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) override;
|
||||||
|
|
||||||
|
|
|
@ -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
|
// Virtual functions: Do nothing for PCB_BASE_FRAME window
|
||||||
void PCB_BASE_FRAME::Show3D_Frame( wxCommandEvent& event )
|
void PCB_BASE_FRAME::Show3D_Frame( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
|
|
|
@ -1032,13 +1032,26 @@ void PCB_EDIT_FRAME::ShowChangedLanguage()
|
||||||
// call my base class
|
// call my base class
|
||||||
PCB_BASE_FRAME::ShowChangedLanguage();
|
PCB_BASE_FRAME::ShowChangedLanguage();
|
||||||
|
|
||||||
m_Layers->SetLayersManagerTabsText();
|
// update the layer manager
|
||||||
|
m_Layers->Freeze();
|
||||||
|
|
||||||
wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers );
|
wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers );
|
||||||
|
|
||||||
pane_info.Caption( _( "Visibles" ) );
|
pane_info.Caption( _( "Visibles" ) );
|
||||||
m_auimgr.Update();
|
m_auimgr.Update();
|
||||||
|
|
||||||
|
m_Layers->SetLayersManagerTabsText();
|
||||||
ReFillLayerWidget();
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,7 @@ public:
|
||||||
void ReCreateAuxiliaryToolbar() override;
|
void ReCreateAuxiliaryToolbar() override;
|
||||||
void ReCreateVToolbar() override;
|
void ReCreateVToolbar() override;
|
||||||
void ReCreateMicrowaveVToolbar();
|
void ReCreateMicrowaveVToolbar();
|
||||||
void ReCreateOptToolbar();
|
void ReCreateOptToolbar() override;
|
||||||
void ReCreateMenuBar() override;
|
void ReCreateMenuBar() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue