Fix PCB_TEXT hit test when bounding box is rotated

Fixes https://gitlab.com/kicad/code/kicad/issues/9866
This commit is contained in:
Mikolaj Wielgus 2021-12-06 00:50:33 +01:00
parent 014bad7b28
commit d0e9d4868c

View File

@ -154,8 +154,8 @@ bool PCB_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy
if( aContains ) if( aContains )
return rect.Contains( GetBoundingBox() ); return rect.Contains( GetBoundingBox() );
else
return rect.Intersects( GetTextBox(), GetDrawRotation() ); return rect.Intersects( GetBoundingBox(), GetDrawRotation() );
} }