Fix a few AUI issues.

This commit is contained in:
jean-pierre charras 2018-08-11 11:26:47 +02:00
parent 78ab5c3f07
commit bd46f720a1
2 changed files with 18 additions and 5 deletions

View File

@ -695,14 +695,19 @@ void FOOTPRINT_EDIT_FRAME::ShowChangedLanguage()
// call my base class
PCB_BASE_EDIT_FRAME::ShowChangedLanguage();
// We have 2 panes to update.
// For some obscure reason, the AUI manager hides the first modified pane.
// So force show panes
wxAuiPaneInfo& tree_pane_info = m_auimgr.GetPane( m_treePane );
bool tree_shown = tree_pane_info.IsShown();
tree_pane_info.Caption( _( "Footprint Libraries" ) );
// update the layer manager
m_Layers->Freeze();
wxAuiPaneInfo& pane_info = m_auimgr.GetPane( m_Layers );
pane_info.Caption( _( "Visibles" ) );
pane_info = m_auimgr.GetPane( m_treePane );
pane_info.Caption( _( "Footprint Libraries" ) );
m_auimgr.Update();
wxAuiPaneInfo& lm_pane_info = m_auimgr.GetPane( m_Layers );
bool lm_shown = lm_pane_info.IsShown();
lm_pane_info.Caption( _( "Visibles" ) );
m_Layers->SetLayersManagerTabsText();
ReFillLayerWidget();
@ -715,6 +720,11 @@ void FOOTPRINT_EDIT_FRAME::ShowChangedLanguage()
m_Layers->OnLayerSelected();
m_Layers->Thaw();
// Now restore the visibility:
lm_pane_info.Show( lm_shown );
tree_pane_info.Show( tree_shown );
m_auimgr.Update();
}

View File

@ -216,6 +216,9 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway,
m_auimgr.LoadPerspective( m_auiPerspective );
// Ensure the draw panel is shown, regardless the perspective config:
m_auimgr.GetPane( wxT( "DrawFrame" ) ).Show( true );
// Now Drawpanel is sized, we can use BestZoom to show the component (if any)
#ifdef USE_WX_GRAPHICS_CONTEXT
GetScreen()->SetScalingFactor( BestZoom() );