diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-11-21 19:06:21 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-11-27 11:03:49 -0800 |
commit | 483f573720a4e0a3db8f41af37acb8e137421192 (patch) | |
tree | ceccfc0f6ed2868500f7bd45719831178eda9b63 | |
parent | 59816394759eda50d3bf7acfe975f2bbbfcb92c7 (diff) |
qml: fix route issue if already currently routed pathicefish_8.99.4icefish_8.99.3icefish_8.99.2icefish/8.99.4icefish/8.99.3icefish/8.99.28.99.48.99.38.99.2
Dropping a pin on map wouldn't function if a route was currently
in progress. Remove several conditionals that would block another
routing from starting.
Bug-AGL: SPEC-2880
Change-Id: I2279f4ed6d89f818f469b5e24352cae5e3b5f60e
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r-- | app/navigation.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/navigation.qml b/app/navigation.qml index a5d20ea..71763c2 100644 --- a/app/navigation.qml +++ b/app/navigation.qml @@ -483,6 +483,9 @@ ApplicationWindow { } function updatePositon() { + if (!routeModel.get(0)) + return; + if(pathcounter <= routeModel.get(0).path.length - 1){ // calculate distance var next_distance = calculateDistance(map.currentpostion.latitude, @@ -646,16 +649,14 @@ ApplicationWindow { function doSetWaypointsSlot(latitude,longitue,startFromCurrentPosition){ - if(btn_guidance.state !== "idle") - btn_guidance.discardWaypoints(startFromCurrentPosition); + btn_guidance.discardWaypoints(startFromCurrentPosition); if(btn_present_position.state === "Optional"){ map.center = map.currentpostion btn_present_position.state = "Flowing" } - if((btn_guidance.state !== "onGuide") && (btn_guidance.state !== "Routing")) - map.addDestination(QtPositioning.coordinate(latitude,longitue)) + map.addDestination(QtPositioning.coordinate(latitude,longitue)) } states: [ |