Don't reserve space for private items when autoplacing.
This commit is contained in:
parent
0dc857b5ab
commit
c919817c18
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2004-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
||||
* Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -883,7 +883,8 @@ void LIB_SYMBOL::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
}
|
||||
|
||||
|
||||
const EDA_RECT LIB_SYMBOL::GetBodyBoundingBox( int aUnit, int aConvert, bool aIncludePins ) const
|
||||
const EDA_RECT LIB_SYMBOL::GetBodyBoundingBox( int aUnit, int aConvert, bool aIncludePins,
|
||||
bool aIncludePrivateItems ) const
|
||||
{
|
||||
EDA_RECT bbox;
|
||||
|
||||
|
@ -895,6 +896,9 @@ const EDA_RECT LIB_SYMBOL::GetBodyBoundingBox( int aUnit, int aConvert, bool aIn
|
|||
if( item.m_convert > 0 && aConvert > 0 && aConvert != item.m_convert )
|
||||
continue;
|
||||
|
||||
if( item.IsPrivate() && !aIncludePrivateItems )
|
||||
continue;
|
||||
|
||||
if( item.Type() == LIB_FIELD_T )
|
||||
continue;
|
||||
|
||||
|
|
|
@ -219,7 +219,8 @@ public:
|
|||
* if aConvert == 0 Convert is non used
|
||||
* Fields are not taken in account
|
||||
**/
|
||||
const EDA_RECT GetBodyBoundingBox( int aUnit, int aConvert, bool aIncludePins ) const;
|
||||
const EDA_RECT GetBodyBoundingBox( int aUnit, int aConvert, bool aIncludePins,
|
||||
bool aIncludePrivateItems ) const;
|
||||
|
||||
const EDA_RECT GetBoundingBox() const override
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -1315,9 +1315,9 @@ EDA_RECT SCH_SYMBOL::doGetBoundingBox( bool aIncludePins, bool aIncludeFields )
|
|||
EDA_RECT bBox;
|
||||
|
||||
if( m_part )
|
||||
bBox = m_part->GetBodyBoundingBox( m_unit, m_convert, aIncludePins );
|
||||
bBox = m_part->GetBodyBoundingBox( m_unit, m_convert, aIncludePins, false );
|
||||
else
|
||||
bBox = dummy()->GetBodyBoundingBox( m_unit, m_convert, aIncludePins );
|
||||
bBox = dummy()->GetBodyBoundingBox( m_unit, m_convert, aIncludePins, false );
|
||||
|
||||
int x0 = bBox.GetX();
|
||||
int xm = bBox.GetRight();
|
||||
|
|
Loading…
Reference in New Issue