PNS: Holes need to be moved with solids

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9773
This commit is contained in:
Jon Evans 2021-11-25 15:31:18 -05:00
parent 08cb573e11
commit 63718323bc
2 changed files with 10 additions and 3 deletions

View File

@ -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<SOLID*>( item.item );
auto jt = m_world->FindJoint( solid->Pos(), solid );
SOLID* solid = static_cast<SOLID*>( 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 )

View File

@ -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;
}