From 7c0a911e9fad3fe99df6c534003b0ff588d7c521 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 16 Jul 2023 18:01:32 +0100 Subject: [PATCH] Override FOOTPRINT::GetCenter() to ignore text. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209 (cherry picked from commit c2e7827774d79adca0743d378725e689e0f47dac) --- pcbnew/footprint.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pcbnew/footprint.h b/pcbnew/footprint.h index 349ed104c0..b16ab71306 100644 --- a/pcbnew/footprint.h +++ b/pcbnew/footprint.h @@ -167,6 +167,11 @@ public: const BOX2I GetBoundingBox() const override; const BOX2I GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ) const; + VECTOR2I GetCenter() const override + { + return GetBoundingBox( false, false ).GetCenter(); + } + PADS& Pads() { return m_pads; } const PADS& Pads() const { return m_pads; }