aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-11-21 19:06:21 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-11-21 20:03:00 -0800
commit5a518e1bc88cbe9d41b53abea04c32bfeb380999 (patch)
treebbd36d531b571f1e4218bddd698b2ab036b34ae7
parente09f658fa39ba1454b8c4670e0655f7019f44b7e (diff)
qml: fix route issue if already currently routed path
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>
-rwxr-xr-xapp/navigation.qml9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/navigation.qml b/app/navigation.qml
index 494fbdf..666c56a 100755
--- a/app/navigation.qml
+++ b/app/navigation.qml
@@ -475,6 +475,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,
@@ -638,16 +641,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: [