Commit 2826f78b authored by Gus Grubba's avatar Gus Grubba

Wait for the fly view map to be initialized before setting states

parent ae63bfe1
...@@ -90,8 +90,10 @@ Item { ...@@ -90,8 +90,10 @@ Item {
_flightMapContainer.state = "pipMode" _flightMapContainer.state = "pipMode"
_flightVideo.state = "fullMode" _flightVideo.state = "fullMode"
//-- Set Map Zoom Level //-- Set Map Zoom Level
_savedZoomLevel = mainWindow.flightDisplayMap.zoomLevel if(mainWindow.flightDisplayMap) {
mainWindow.flightDisplayMap.zoomLevel = _savedZoomLevel - 3 _savedZoomLevel = mainWindow.flightDisplayMap.zoomLevel
mainWindow.flightDisplayMap.zoomLevel = _savedZoomLevel - 3
}
} }
} }
...@@ -135,10 +137,10 @@ Item { ...@@ -135,10 +137,10 @@ Item {
} }
onVtolTransitionToFwdFlight: guidedController.confirmAction(guidedController.actionVtolTransitionToFwdFlight) onVtolTransitionToFwdFlight: guidedController.confirmAction(guidedController.actionVtolTransitionToFwdFlight)
onVtolTransitionToMRFlight: guidedController.confirmAction(guidedController.actionVtolTransitionToMRFlight) onVtolTransitionToMRFlight: guidedController.confirmAction(guidedController.actionVtolTransitionToMRFlight)
onFlightDisplayMapChanged: setStates()
} }
Component.onCompleted: { Component.onCompleted: {
setStates()
if(QGroundControl.corePlugin.options.flyViewOverlay.toString().length) { if(QGroundControl.corePlugin.options.flyViewOverlay.toString().length) {
flyViewOverlay.source = QGroundControl.corePlugin.options.flyViewOverlay flyViewOverlay.source = QGroundControl.corePlugin.options.flyViewOverlay
} }
......
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