diff --git a/common/tool/edit_points.cpp b/common/tool/edit_points.cpp index b9ef9dbe7b..38d6b8be32 100644 --- a/common/tool/edit_points.cpp +++ b/common/tool/edit_points.cpp @@ -61,11 +61,8 @@ EDIT_POINT* EDIT_POINTS::FindPoint( const VECTOR2I& aLocation, KIGFX::VIEW *aVie if( m_allowPoints ) { - // Check from the end so that we get the topmost point - for( auto r_it = m_points.rbegin(); r_it != m_points.rend(); ++r_it ) + for( EDIT_POINT& point : m_points ) { - EDIT_POINT& point = *r_it; - if( point.WithinPoint( aLocation, size ) ) return &point; }