Browse Source

Fix a few AUI issues.

pull/13/head
jean-pierre charras 7 years ago
parent
commit
bd46f720a1
  1. 20
      pcbnew/footprint_edit_frame.cpp
  2. 3
      pcbnew/footprint_wizard_frame.cpp

20
pcbnew/footprint_edit_frame.cpp

@ -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();
}

3
pcbnew/footprint_wizard_frame.cpp

@ -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() );

Loading…
Cancel
Save