diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2015-02-04 13:27:48 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:37:08 +0300 |
commit | c4cdb670d4ce1db298bf2ca0190749b7cc6a7ce7 (patch) | |
tree | fded8362f4e769793f77965fbbc39c5aae44a81d /map/route_track.cpp | |
parent | f8222d5ac4ea8bf2daa436bf8dcfbd41c60a02f5 (diff) |
Bugfix. Drawing turn arrows on the navigation route when they are close to the end and the beginnig of the route.
Diffstat (limited to 'map/route_track.cpp')
-rw-r--r-- | map/route_track.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/map/route_track.cpp b/map/route_track.cpp index 4d88d76159..5938ecd17f 100644 --- a/map/route_track.cpp +++ b/map/route_track.cpp @@ -42,7 +42,7 @@ bool ClipArrowBodyAndGetArrowDirection(vector<m2::PointD> & ptsTurn, pair<m2::Po double len = 0, vLen = 0; while (len < afterTurn) { - if (i >= ptsTurnSz - 2) + if (i > ptsTurnSz - 2) return false; vLen = ptsTurn[i + 1].Length(ptsTurn[i]); len += vLen; @@ -56,7 +56,7 @@ bool ClipArrowBodyAndGetArrowDirection(vector<m2::PointD> & ptsTurn, pair<m2::Po size_t j = i; while (lenForArrow < arrowLength) { - if (j >= ptsTurnSz - 2) + if (j > ptsTurnSz - 2) return false; vLenForArrow = ptsTurn[j + 1].Length(ptsTurn[j]); lenForArrow += vLenForArrow; @@ -91,7 +91,7 @@ bool ClipArrowBodyAndGetArrowDirection(vector<m2::PointD> & ptsTurn, pair<m2::Po len = 0; while (len < beforeTurn) { - if (i <= 1) + if (i < 1) return false; vLen = ptsTurn[i - 1].Length(ptsTurn[i]); len += vLen; |