Tune the hit-test extra-slop for lines (and apply it to arcs too).

Fixes https://gitlab.com/kicad/code/kicad/issues/13429
This commit is contained in:
Jeff Young 2023-01-07 23:02:03 +00:00
parent ee0e90e3b0
commit c3ca1ce014
1 changed files with 3 additions and 2 deletions

View File

@ -1047,9 +1047,10 @@ void EE_SELECTION_TOOL::GuessSelectionCandidates( EE_COLLECTOR& collector, const
// Lines are hard to hit. Give them a bit more slop to still be considered "exact".
if( line || ( shape && shape->GetShape() == SHAPE_T::POLY ) )
if( line || ( shape && shape->GetShape() == SHAPE_T::POLY )
|| ( shape && shape->GetShape() == SHAPE_T::ARC ) )
{
int pixelThreshold = KiROUND( getView()->ToWorld( 1 ) );
int pixelThreshold = KiROUND( getView()->ToWorld( 6 ) );
if( item->HitTest( aPos, pixelThreshold ) )
exactHits.insert( item );