From 85f18c474e2acf56d2b8f7957ca194192c1b4de3 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Tue, 18 Apr 2017 19:38:57 -0700 Subject: [PATCH] Fix for invalid home coord --- src/FlightMap/Widgets/MapFitFunctions.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FlightMap/Widgets/MapFitFunctions.qml b/src/FlightMap/Widgets/MapFitFunctions.qml index cac5d32e0..527685b30 100644 --- a/src/FlightMap/Widgets/MapFitFunctions.qml +++ b/src/FlightMap/Widgets/MapFitFunctions.qml @@ -48,7 +48,10 @@ Item { function fitMapViewportToAllCoordinates(coordList) { var mapFitViewport = Qt.rect(0, 0, map.width, map.height) if (coordList.length == 0) { - map.center = fitHomePosition() + var homeCoord = fitHomePosition() + if (homeCoord.isValid) { + map.center = homeCoord + } return } -- 2.22.0