From a03799c61e73645f412c0a78629a1c8adf66b4ec Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 5 Nov 2022 21:53:57 +0000 Subject: [PATCH] Don't mark collisions on dragged items, only things they collide with. Fixes https://gitlab.com/kicad/code/kicad/issues/8965 --- pcbnew/router/pns_router.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index ee296d71f8..db47e209b4 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -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 ); }