From 33f465f75461487228e0147fa515c4e417fd29e1 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 10 Mar 2021 18:38:38 +0100 Subject: [PATCH] SCH_GLOBALLABEL::GetBoundingBox(): do not include IREF when not shown. --- eeschema/sch_text.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/eeschema/sch_text.cpp b/eeschema/sch_text.cpp index fa34771e1d..ac7fcc25b8 100644 --- a/eeschema/sch_text.cpp +++ b/eeschema/sch_text.cpp @@ -1349,13 +1349,16 @@ const EDA_RECT SCH_GLOBALLABEL::GetBoundingBoxBase() const const EDA_RECT SCH_GLOBALLABEL::GetBoundingBox() const { // 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() ); - box.Merge( m_intersheetRefsField.GetBoundingBox() ); + if( Schematic()->Settings().m_IntersheetRefsShow ) + { + box.Merge( m_intersheetRefsField.GetBoundingBox() ); + box.Normalize(); + } - box.Normalize(); return box; }