diff --git a/pcbnew/router/pns_component_dragger.cpp b/pcbnew/router/pns_component_dragger.cpp index 7138f569ea..b5ea99bc88 100644 --- a/pcbnew/router/pns_component_dragger.cpp +++ b/pcbnew/router/pns_component_dragger.cpp @@ -117,14 +117,15 @@ bool COMPONENT_DRAGGER::Start( const VECTOR2I& aP, ITEM_SET& aPrimitives ) if( item.item->Kind() != ITEM::SOLID_T ) continue; - auto solid = static_cast( item.item ); - auto jt = m_world->FindJoint( solid->Pos(), solid ); + SOLID* solid = static_cast( item.item ); m_solids.insert( solid ); - if( ! item.item->IsRoutable() ) + if( !item.item->IsRoutable() ) continue; + JOINT* jt = m_world->FindJoint( solid->Pos(), solid ); + for( auto link : jt->LinkList() ) { if( link.item->OfKind( ITEM::SEGMENT_T | ITEM::ARC_T ) ) @@ -174,6 +175,9 @@ bool COMPONENT_DRAGGER::Drag( const VECTOR2I& aP ) m_draggedItems.Add( snew.get() ); m_currentNode->Add( std::move( snew ) ); + if( !s->IsRoutable() ) + continue; + for( auto& l : m_conns ) { if( l.attachedPad == s ) diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index 4dc357be5d..d11565dd67 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -165,6 +165,9 @@ void SOLID::SetPos( const VECTOR2I& aCenter ) if( m_shape ) m_shape->Move( delta ); + if( m_hole ) + m_hole->Move( delta ); + m_pos = aCenter; }