7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 17:03:44 +00:00

Ensure that auimanager has a frame

restoring the last footprint might ask for the infobar, which requires
the auimanger to have a frame

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19103
This commit is contained in:
Seth Hillbrand 2024-11-18 12:02:22 -08:00
parent 325d6ff064
commit 5eb11f705b

View File

@ -178,9 +178,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
initLibraryTree();
m_treePane = new FOOTPRINT_TREE_PANE( this );
// restore the last footprint from the project, if any, after the library has been init'ed
restoreLastFootprint();
ReCreateMenuBar();
ReCreateHToolbar();
ReCreateVToolbar();
@ -264,8 +261,6 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_acceptedExts.emplace( FILEEXT::KiCadFootprintFileExtension, &PCB_ACTIONS::ddImportFootprint );
DragAcceptFiles( true );
ActivateGalCanvas();
FinishAUIInitialization();
// Apply saved visibility stuff at the end
@ -285,6 +280,14 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
m_appearancePanel->SetTabIndex( cfg->m_AuiPanels.appearance_panel_tab );
}
// restore the last footprint from the project, if any, after the library has been init'ed
// N.B. This needs to happen after the AUI manager has been initialized so that we can
// properly call the WX_INFOBAR without crashing on some systems.
restoreLastFootprint();
// This displays the last footprint loaded, if any, so it must be done after restoreLastFootprint()
ActivateGalCanvas();
GetToolManager()->PostAction( ACTIONS::zoomFitScreen );
UpdateTitle();
setupUnits( GetSettings() );