From 37091df1421ef0a9cace65d9fa11f6aab408282e Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 14 Feb 2023 18:25:22 -0500 Subject: [PATCH] Symbol chooser: save UI settings even when canceled Fixes https://gitlab.com/kicad/code/kicad/-/issues/13903 (cherry picked from commit 29c4482bc898f627cebcd5f64e063e8a813a5445) --- eeschema/picksymbol.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eeschema/picksymbol.cpp b/eeschema/picksymbol.cpp index 1574d985ce..f55ad66965 100644 --- a/eeschema/picksymbol.cpp +++ b/eeschema/picksymbol.cpp @@ -196,12 +196,14 @@ PICKED_SYMBOL SCH_BASE_FRAME::PickSymbolFromLibTree( const SYMBOL_LIBRARY_FILTER DIALOG_CHOOSE_SYMBOL dlg( this, dialogTitle, dataPtr, aConvert, aAllowFields, aShowFootprints, aUseLibBrowser ); - if( dlg.ShowModal() == wxID_CANCEL ) - return PICKED_SYMBOL(); + int ret = dlg.ShowModal(); // Save any changes to column widths, etc. modelAdapter->SaveSettings(); + if( ret == wxID_CANCEL ) + return PICKED_SYMBOL(); + PICKED_SYMBOL sel; LIB_ID id = dlg.GetSelectedLibId( &sel.Unit );