diff options
Diffstat (limited to 'src/positioning/qgeopath.cpp')
-rw-r--r-- | src/positioning/qgeopath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |