Commit 9a4cb390 authored by DonLakeFlyer's avatar DonLakeFlyer

Reposition map after KML load

parent 2823a401
......@@ -155,7 +155,7 @@ FlightMap {
}
MapFitFunctions {
id: mapFitFunctions
id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
map: _flightMap
usePlannedHomePosition: false
planMasterController: _planMasterController
......
......@@ -90,10 +90,6 @@ Item {
}
function addMissionItemCoordsForFit(coordList) {
var homePosition = fitHomePosition()
if (homePosition.isValid) {
coordList.push(homePosition)
}
for (var i=1; i<_missionController.visualItems.count; i++) {
var missionItem = _missionController.visualItems.get(i)
if (missionItem.specifiesCoordinate && !missionItem.isStandaloneCoordinate) {
......
......@@ -181,6 +181,7 @@ Item {
onAcceptedForLoad: {
mapPolygon.loadKMLFile(file)
mapFitFunctions.fitMapViewportToMissionItems()
close()
}
}
......
......@@ -84,7 +84,7 @@ QGCView {
property bool _firstLoadComplete: false
MapFitFunctions {
id: mapFitFunctions
id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
map: editorMap
usePlannedHomePosition: true
planMasterController: _planMasterController
......
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