From d0e9d4868cb3600b08e232ebb9b152d48be1d2f3 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Mon, 6 Dec 2021 00:50:33 +0100 Subject: [PATCH] Fix PCB_TEXT hit test when bounding box is rotated Fixes https://gitlab.com/kicad/code/kicad/issues/9866 --- pcbnew/pcb_text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_text.cpp b/pcbnew/pcb_text.cpp index d9962038b3..8b55eb186e 100644 --- a/pcbnew/pcb_text.cpp +++ b/pcbnew/pcb_text.cpp @@ -154,8 +154,8 @@ bool PCB_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy if( aContains ) return rect.Contains( GetBoundingBox() ); - else - return rect.Intersects( GetTextBox(), GetDrawRotation() ); + + return rect.Intersects( GetBoundingBox(), GetDrawRotation() ); }