PNS: Remove holes when removing items with holes

Related to https://gitlab.com/kicad/code/kicad/-/issues/14702


(cherry picked from commit b06f90335b)
This commit is contained in:
Jon Evans 2023-05-07 22:12:11 -04:00
parent 947923509e
commit f3c864c178
1 changed files with 14 additions and 0 deletions

View File

@ -841,8 +841,15 @@ void NODE::Remove( ITEM* aItem )
break;
case ITEM::SOLID_T:
{
SOLID* solid = static_cast<SOLID*>( aItem );
if( solid->HasHole() )
Remove( solid->Hole() );
Remove( static_cast<SOLID*>( aItem ) );
break;
}
case ITEM::SEGMENT_T:
Remove( static_cast<SEGMENT*>( aItem ) );
@ -859,8 +866,15 @@ void NODE::Remove( ITEM* aItem )
}
case ITEM::VIA_T:
{
VIA* via = static_cast<VIA*>( aItem );
if( via->HasHole() )
Remove( via->Hole() );
Remove( static_cast<VIA*>( aItem ) );
break;
}
default:
break;