mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Don't trip over a stale sort column index. (KICAD-B3X)
This commit is contained in:
parent
86280d5a65
commit
e1d1243a91
@ -392,6 +392,8 @@ bool FIELDS_EDITOR_GRID_DATA_MODEL::cmp( const DATA_MODEL_ROW& lhGroup,
|
||||
};
|
||||
|
||||
// Primary sort key is sortCol; secondary is always REFERENCE (column 0)
|
||||
if( sortCol < 0 || sortCol >= dataModel->GetNumberCols() )
|
||||
sortCol = 0;
|
||||
|
||||
wxString lhs = dataModel->GetValue( lhGroup, sortCol ).Trim( true ).Trim( false );
|
||||
wxString rhs = dataModel->GetValue( rhGroup, sortCol ).Trim( true ).Trim( false );
|
||||
|
Loading…
x
Reference in New Issue
Block a user