Trim before sorting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17046
This commit is contained in:
parent
e400d49af6
commit
df3eaf0e03
|
@ -317,8 +317,8 @@ bool FIELDS_EDITOR_GRID_DATA_MODEL::cmp( const DATA_MODEL_ROW& lhGroup,
|
||||||
|
|
||||||
// Primary sort key is sortCol; secondary is always REFERENCE (column 0)
|
// Primary sort key is sortCol; secondary is always REFERENCE (column 0)
|
||||||
|
|
||||||
wxString lhs = dataModel->GetValue( (DATA_MODEL_ROW&) lhGroup, sortCol );
|
wxString lhs = dataModel->GetValue( lhGroup, sortCol ).Trim( true ).Trim( false );
|
||||||
wxString rhs = dataModel->GetValue( (DATA_MODEL_ROW&) rhGroup, sortCol );
|
wxString rhs = dataModel->GetValue( rhGroup, sortCol ).Trim( true ).Trim( false );
|
||||||
|
|
||||||
if( lhs == rhs || sortCol == REFERENCE_FIELD )
|
if( lhs == rhs || sortCol == REFERENCE_FIELD )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue