diff --git a/src/FlightDisplay/FlightDisplayViewMap.qml b/src/FlightDisplay/FlightDisplayViewMap.qml index 7ae130ab8383362b83c2e7230a2147310b22c06f..6dd9f531db02a6b53be589ba4c7877ac0743db61 100644 --- a/src/FlightDisplay/FlightDisplayViewMap.qml +++ b/src/FlightDisplay/FlightDisplayViewMap.qml @@ -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 diff --git a/src/FlightMap/Widgets/MapFitFunctions.qml b/src/FlightMap/Widgets/MapFitFunctions.qml index c35caa38c12d4cfeddab997f6a65323aeffa426a..c6336514fddfa7efbdcd849986f442466652dc7d 100644 --- a/src/FlightMap/Widgets/MapFitFunctions.qml +++ b/src/FlightMap/Widgets/MapFitFunctions.qml @@ -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) { diff --git a/src/MissionManager/QGCMapPolygonVisuals.qml b/src/MissionManager/QGCMapPolygonVisuals.qml index c0bd2ee7ba343c155f1b878d930e00f14349ad26..3e974e8c861eeab68e83dda5c378e61fdc2961ed 100644 --- a/src/MissionManager/QGCMapPolygonVisuals.qml +++ b/src/MissionManager/QGCMapPolygonVisuals.qml @@ -180,6 +180,7 @@ Item { fileExtension: "kml" onAcceptedForLoad: { mapPolygon.loadKMLFile(file) + mapFitFunctions.fitMapViewportToMissionItems() close() } } diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index 16b4209f0a0cb4f949939d6d8052b91d5f757684..d6eebf623d55c7c740e0ef89a85780512c9457c7 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -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