diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-06-05 20:50:38 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2017-06-06 11:17:48 +0000 |
commit | 517722e29791790b5480cdd7918a022bd1fbbbc5 (patch) | |
tree | edb7c8b0940af48c21fd2a93a377a1a202e053c9 /src | |
parent | 1a7ed8d683334f473748e84a7413d38a03ca8434 (diff) | |
download | qtlocation-517722e29791790b5480cdd7918a022bd1fbbbc5.tar.gz |
Fix for incorrect QGeoPathPrivate::contains
Change-Id: I4067d6df69aad0af9495a29532a34f0a7e992596
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-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; |