UUID compare should always be last
It is, by definition, unique, so all comparisons should be made before it or they won't be made at all. Fixes https://gitlab.com/kicad/code/kicad/issues/5940
This commit is contained in:
parent
68240821d4
commit
f6578da824
|
@ -205,13 +205,13 @@ bool SCH_ITEM::operator < ( const SCH_ITEM& aItem ) const
|
|||
if( Type() != aItem.Type() )
|
||||
return Type() < aItem.Type();
|
||||
|
||||
if( m_Uuid != aItem.m_Uuid )
|
||||
return m_Uuid < aItem.m_Uuid;
|
||||
|
||||
if( GetPosition().x != aItem.GetPosition().x )
|
||||
return GetPosition().x < aItem.GetPosition().x;
|
||||
|
||||
return GetPosition().y < aItem.GetPosition().y;
|
||||
if( GetPosition().y != aItem.GetPosition().y )
|
||||
return GetPosition().y < aItem.GetPosition().y;
|
||||
|
||||
return m_Uuid < aItem.m_Uuid;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue