Sort col may not be in the current columns. (KICAD-G74)

This commit is contained in:
Jeff Young 2025-07-03 23:14:35 -06:00
parent 7b0aceb99e
commit 4e4dfa0a38

View File

@ -971,7 +971,10 @@ BOM_PRESET FIELDS_EDITOR_GRID_DATA_MODEL::GetBomSettings()
BOM_PRESET current;
current.readOnly = false;
current.fieldsOrdered = GetFieldsOrdered();
current.sortField = GetColFieldName( GetSortCol() );
if( GetSortCol() >= 0 && GetSortCol() < GetNumberCols() )
current.sortField = GetColFieldName( GetSortCol() );
current.sortAsc = GetSortAsc();
current.filterString = GetFilter();
current.groupSymbols = GetGroupingEnabled();