Make sure text bounding box exists when syncing PNS world.

Fixes https://gitlab.com/kicad/code/kicad/issues/14733
This commit is contained in:
Alex 2023-05-14 13:40:14 +03:00
parent 0d893f09ef
commit d790865549
1 changed files with 3 additions and 0 deletions

View File

@ -1269,6 +1269,9 @@ bool PNS_KICAD_IFACE_BASE::syncTextItem( PNS::NODE* aWorld, PCB_TEXT* aText, PCB
aText->TransformBoundingBoxToPolygon( &cornerBuffer, margin ); aText->TransformBoundingBoxToPolygon( &cornerBuffer, margin );
if( !cornerBuffer.OutlineCount() )
return false;
for( const VECTOR2I& pt : cornerBuffer.Outline( 0 ).CPoints() ) for( const VECTOR2I& pt : cornerBuffer.Outline( 0 ).CPoints() )
shape->Append( pt ); shape->Append( pt );