Override FOOTPRINT::GetCenter() to ignore text.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209
This commit is contained in:
Jeff Young 2023-07-16 18:01:32 +01:00
parent 7b81e964ab
commit c2e7827774
1 changed files with 5 additions and 0 deletions

View File

@ -172,6 +172,11 @@ public:
const BOX2I GetBoundingBox() const override;
const BOX2I GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ) const;
VECTOR2I GetCenter() const override
{
return GetBoundingBox( false, false ).GetCenter();
}
PCB_FIELDS& Fields() { return m_fields; }
const PCB_FIELDS& Fields() const { return m_fields; }