FOOTPRINT::cmp_drawings(): fix a incorrect sort criteria for polygons:
for polygons, GetStart() and GetEnd() have no meaning and cannotbe used for sorting.
This commit is contained in:
parent
752d2d5295
commit
f6314e6401
|
@ -3015,8 +3015,13 @@ bool FOOTPRINT::cmp_drawings::operator()( const BOARD_ITEM* itemA, const BOARD_I
|
|||
|
||||
TEST( dwgA->GetShape(), dwgB->GetShape() );
|
||||
|
||||
TEST_PT( dwgA->GetStart(), dwgB->GetStart() );
|
||||
TEST_PT( dwgA->GetEnd(), dwgB->GetEnd() );
|
||||
// GetStart() and GetEnd() have no meaning with polygons.
|
||||
// We cannot use them for sorting polygons
|
||||
if( dwgA->GetShape() != SHAPE_T::POLY )
|
||||
{
|
||||
TEST_PT( dwgA->GetStart(), dwgB->GetStart() );
|
||||
TEST_PT( dwgA->GetEnd(), dwgB->GetEnd() );
|
||||
}
|
||||
|
||||
if( dwgA->GetShape() == SHAPE_T::ARC )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue