Browse Source

Fix for invalid home coord

QGC4.4
Don Gagne 8 years ago
parent
commit
85f18c474e
  1. 5
      src/FlightMap/Widgets/MapFitFunctions.qml

5
src/FlightMap/Widgets/MapFitFunctions.qml

@ -48,7 +48,10 @@ Item {
function fitMapViewportToAllCoordinates(coordList) { function fitMapViewportToAllCoordinates(coordList) {
var mapFitViewport = Qt.rect(0, 0, map.width, map.height) var mapFitViewport = Qt.rect(0, 0, map.width, map.height)
if (coordList.length == 0) { if (coordList.length == 0) {
map.center = fitHomePosition() var homeCoord = fitHomePosition()
if (homeCoord.isValid) {
map.center = homeCoord
}
return return
} }

Loading…
Cancel
Save