Don't include hidden fields in bounding box.

Fixes https://gitlab.com/kicad/code/kicad/issues/8809
This commit is contained in:
Jeff Young 2021-07-22 13:53:20 +01:00
parent 4760480f40
commit fa93c1ec65
1 changed files with 4 additions and 1 deletions

View File

@ -1329,7 +1329,10 @@ const EDA_RECT SCH_SYMBOL::GetBoundingBox() const
EDA_RECT bbox = GetBodyBoundingBox();
for( const SCH_FIELD& field : m_fields )
bbox.Merge( field.GetBoundingBox() );
{
if( field.IsVisible() )
bbox.Merge( field.GetBoundingBox() );
}
return bbox;
}