Symbol chooser: save UI settings even when canceled

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13903
This commit is contained in:
Jon Evans 2023-02-14 18:25:22 -05:00
parent 0913552f84
commit 29c4482bc8
1 changed files with 4 additions and 2 deletions

View File

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