Commit 1ca79c65 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Ignore invalid turn points.

Most notably this happened when a route consists only of one large,
unnamed segment (Yours).
CCBUG: 285455
parent 2afed2ee
......@@ -28,7 +28,9 @@ void Route::addRouteSegment( const RouteSegment &segment )
m_bounds = m_bounds.united( segment.bounds() );
m_distance += segment.distance();
m_path << segment.path();
m_turnPoints << segment.maneuver().position();
if ( segment.maneuver().position().longitude() != 0.0 && segment.maneuver().position().latitude() != 0.0 ) {
m_turnPoints << segment.maneuver().position();
}
if ( segment.maneuver().hasWaypoint() ) {
m_waypoints << segment.maneuver().waypoint();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment