From ca8f1e245f0a6bf20e982c8aaddfbfef531806ef Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Sun, 15 Feb 2026 16:57:39 +0000 Subject: [PATCH] Always set toolbars to visible when loading string perspective Even in wx 3.3, we load string AUI perspectives on settings migration (e.g., from a wx 3.2 version to wx 3.3, like the 9->10 transition). In that case, we also need to ensure the toolbars are shown. Fixes https://gitlab.com/kicad/code/kicad/-/issues/23075 --- common/eda_base_frame.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/eda_base_frame.cpp b/common/eda_base_frame.cpp index 393c75c61a..8388975c3f 100644 --- a/common/eda_base_frame.cpp +++ b/common/eda_base_frame.cpp @@ -1185,9 +1185,9 @@ void EDA_BASE_FRAME::RestoreAuiLayout() if( !ADVANCED_CFG::GetCfg().m_EnableUseAuiPerspective ) return; -#if wxCHECK_VERSION( 3, 3, 0 ) bool restored = false; +#if wxCHECK_VERSION( 3, 3, 0 ) if( m_auiLayoutState && !m_auiLayoutState->is_null() && !m_auiLayoutState->empty() ) { WX_AUI_JSON_SERIALIZER serializer( m_auimgr ); @@ -1195,11 +1195,13 @@ void EDA_BASE_FRAME::RestoreAuiLayout() if( serializer.Deserialize( *m_auiLayoutState ) ) restored = true; } +#endif + /* + * Legacy loading of the string AUI perspective (if it exists). This is needed for + * wx 3.2 or the first settings upgrade when wx 3.3 is used in KiCad (e.g., 9.0->10.0 for Windows and macOS). + */ if( !restored && !m_perspective.IsEmpty() ) - m_auimgr.LoadPerspective( m_perspective ); -#else - if( !m_perspective.IsEmpty() ) { m_auimgr.LoadPerspective( m_perspective ); @@ -1214,7 +1216,6 @@ void EDA_BASE_FRAME::RestoreAuiLayout() panes.Item( i ).Show( true ); } } -#endif }