diff --git a/eeschema/lib_symbol.cpp b/eeschema/lib_symbol.cpp index 755436a9db..d0154dd243 100644 --- a/eeschema/lib_symbol.cpp +++ b/eeschema/lib_symbol.cpp @@ -930,13 +930,16 @@ const EDA_RECT LIB_SYMBOL::GetBodyBoundingBox( int aUnit, int aConvert, bool aIn { const LIB_PIN& pin = static_cast( item ); - // Note: the roots of the pins are always included for symbols that don't have a - // well-defined body. + if( pin.IsVisible() ) + { + // Note: the roots of the pins are always included for symbols that don't have + // a well-defined body. - if( aIncludePins && pin.IsVisible() ) - bbox.Merge( pin.GetBoundingBox( false, true ) ); - else - bbox.Merge( pin.GetPinRoot() ); + if( aIncludePins ) + bbox.Merge( pin.GetBoundingBox( false, true ) ); + else + bbox.Merge( pin.GetPinRoot() ); + } } else {