SCH_GLOBALLABEL::GetBoundingBox(): do not include IREF when not shown.

This commit is contained in:
jean-pierre charras 2021-03-10 18:38:38 +01:00
parent d295b5d6de
commit 33f465f754
1 changed files with 6 additions and 3 deletions

View File

@ -1349,13 +1349,16 @@ const EDA_RECT SCH_GLOBALLABEL::GetBoundingBoxBase() const
const EDA_RECT SCH_GLOBALLABEL::GetBoundingBox() const const EDA_RECT SCH_GLOBALLABEL::GetBoundingBox() const
{ {
// build the bounding box on the global label only, including the intersheets references // build the bounding box on the global label only, including the intersheets references
// full bounding box // full bounding box if they are shown
EDA_RECT box( GetBoundingBoxBase() ); EDA_RECT box( GetBoundingBoxBase() );
box.Merge( m_intersheetRefsField.GetBoundingBox() ); if( Schematic()->Settings().m_IntersheetRefsShow )
{
box.Merge( m_intersheetRefsField.GetBoundingBox() );
box.Normalize();
}
box.Normalize();
return box; return box;
} }