PNS: Ensure we don't miss items
Higher candidate levels could override better matches if the layers did not overlap.
This commit is contained in:
parent
f183b4f526
commit
3cc87b4597
|
@ -189,16 +189,13 @@ ITEM* TOOL_BASE::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLayer, b
|
|||
if( item && !item->Layers().Overlaps( tl ) )
|
||||
item = NULL;
|
||||
|
||||
if( item )
|
||||
if( item && ( aLayer < 0 || item->Layers().Overlaps( aLayer ) ) )
|
||||
{
|
||||
rv = item;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( rv && aLayer >= 0 && !rv->Layers().Overlaps( aLayer ) )
|
||||
rv = NULL;
|
||||
|
||||
if( rv )
|
||||
{
|
||||
wxLogTrace( "PNS", "%s, layer : %d, tl: %d", rv->KindStr().c_str(), rv->Layers().Start(), tl );
|
||||
|
|
Loading…
Reference in New Issue