Override FOOTPRINT::GetCenter() to ignore text.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209

(cherry picked from commit c2e7827774)
This commit is contained in:
Jeff Young 2023-07-16 18:01:32 +01:00
parent 0562776b7a
commit 7c0a911e9f
1 changed files with 5 additions and 0 deletions

View File

@ -167,6 +167,11 @@ public:
const BOX2I GetBoundingBox() const override; const BOX2I GetBoundingBox() const override;
const BOX2I GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ) const; const BOX2I GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ) const;
VECTOR2I GetCenter() const override
{
return GetBoundingBox( false, false ).GetCenter();
}
PADS& Pads() { return m_pads; } PADS& Pads() { return m_pads; }
const PADS& Pads() const { return m_pads; } const PADS& Pads() const { return m_pads; }