From 517722e29791790b5480cdd7918a022bd1fbbbc5 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Mon, 5 Jun 2017 20:50:38 +0200 Subject: Fix for incorrect QGeoPathPrivate::contains Change-Id: I4067d6df69aad0af9495a29532a34f0a7e992596 Reviewed-by: Alex Blasche --- src/positioning/qgeopath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/positioning/qgeopath.cpp b/src/positioning/qgeopath.cpp index b24daec6..ad3536af 100644 --- a/src/positioning/qgeopath.cpp +++ b/src/positioning/qgeopath.cpp @@ -464,7 +464,7 @@ bool QGeoPathPrivate::contains(const QGeoCoordinate &coordinate) const QDoubleVector2D candidate = ( (p-a).length() < (p-b).length() ) ? a : b; - if (u < (b - a).length() + if (u > 0 && u < 1 && (p-intersection).length() < (p-candidate).length() ) // And it falls in the segment candidate = intersection; -- cgit v1.2.1