Browse Source

Merge pull request #6216 from DonLakeFlyer/LoadKMLMapMove

Reposition map after KML load
QGC4.4
Don Gagne 7 years ago committed by GitHub
parent
commit
5f39c6ab49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/FlightDisplay/FlightDisplayViewMap.qml
  2. 4
      src/FlightMap/Widgets/MapFitFunctions.qml
  3. 1
      src/MissionManager/QGCMapPolygonVisuals.qml
  4. 2
      src/PlanView/PlanView.qml

2
src/FlightDisplay/FlightDisplayViewMap.qml

@ -155,7 +155,7 @@ FlightMap { @@ -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

4
src/FlightMap/Widgets/MapFitFunctions.qml

@ -90,10 +90,6 @@ Item { @@ -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) {

1
src/MissionManager/QGCMapPolygonVisuals.qml

@ -181,6 +181,7 @@ Item { @@ -181,6 +181,7 @@ Item {
onAcceptedForLoad: {
mapPolygon.loadKMLFile(file)
mapFitFunctions.fitMapViewportToMissionItems()
close()
}
}

2
src/PlanView/PlanView.qml

@ -84,7 +84,7 @@ QGCView { @@ -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

Loading…
Cancel
Save