Don't mark collisions on dragged items, only things they collide with.

Fixes https://gitlab.com/kicad/code/kicad/issues/8965
This commit is contained in:
Jeff Young 2022-11-05 21:53:57 +00:00
parent 2899ee1eb4
commit a03799c61e
1 changed files with 9 additions and 0 deletions

View File

@ -664,8 +664,17 @@ void ROUTER::markViolations( NODE* aNode, ITEM_SET& aCurrent, NODE::ITEM_VECTOR&
}
}
ITEM_SET draggedItems;
if( GetDragger() )
draggedItems = GetDragger()->Traces();
for( OBSTACLE& obs : obstacles )
{
// Don't mark items being dragged; only board items they collide with
if( draggedItems.Contains( obs.m_item ) )
continue;
obs.m_item->Mark( obs.m_item->Marker() | MK_VIOLATION );
updateItem( item, obs.m_item );
}