PNS: Remove holes when removing items with holes

Related to https://gitlab.com/kicad/code/kicad/-/issues/14702
This commit is contained in:
Jon Evans 2023-05-07 22:12:11 -04:00
parent 09e8f72196
commit b06f90335b
1 changed files with 14 additions and 0 deletions

View File

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