Ensure sheets are deterministically sorted
Even if a sheet exists at the same x/y coordinate as another, the sort needs to ensure a deterministic ordering
This commit is contained in:
parent
c80efb0f98
commit
09be1a8c78
|
@ -962,7 +962,13 @@ void SCH_SCREEN::GetSheets( std::vector<SCH_ITEM*>* aItems ) const
|
|||
[]( EDA_ITEM* a, EDA_ITEM* b ) -> bool
|
||||
{
|
||||
if( a->GetPosition().x == b->GetPosition().x )
|
||||
{
|
||||
// Ensure deterministic sort
|
||||
if( a->GetPosition().y == b->GetPosition().y )
|
||||
return a->m_Uuid < b->m_Uuid;
|
||||
|
||||
return a->GetPosition().y < b->GetPosition().y;
|
||||
}
|
||||
else
|
||||
return a->GetPosition().x < b->GetPosition().x;
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue