Commit 13d939d6 authored by Gus Grubba's avatar Gus Grubba

Don't allow map view to go invisible

Handle connection to non initialized target
parent 2d358906
...@@ -32,6 +32,11 @@ FlightMap { ...@@ -32,6 +32,11 @@ FlightMap {
allowVehicleLocationCenter: !_keepVehicleCentered allowVehicleLocationCenter: !_keepVehicleCentered
planView: false planView: false
onVisibleChanged: {
// I don't know what is causing this to become invisible when a connection is dropped
if(!visible) visible = true
}
property alias scaleState: mapScale.state property alias scaleState: mapScale.state
// The following properties must be set by the consumer // The following properties must be set by the consumer
...@@ -39,7 +44,7 @@ FlightMap { ...@@ -39,7 +44,7 @@ FlightMap {
property var flightWidgets property var flightWidgets
property var rightPanelWidth property var rightPanelWidth
property var multiVehicleView ///< true: multi-vehicle view, false: single vehicle view property var multiVehicleView ///< true: multi-vehicle view, false: single vehicle view
property var missionController property var missionController: null
property rect centerViewport: Qt.rect(0, 0, width, height) property rect centerViewport: Qt.rect(0, 0, width, height)
...@@ -161,7 +166,9 @@ FlightMap { ...@@ -161,7 +166,9 @@ FlightMap {
QGCMapPalette { id: mapPal; lightColors: isSatelliteMap } QGCMapPalette { id: mapPal; lightColors: isSatelliteMap }
Connections { Connections {
target: missionController enabled: missionController !== null
target: missionController
ignoreUnknownSignals: true
onNewItemsFromVehicle: { onNewItemsFromVehicle: {
var visualItems = missionController.visualItems var visualItems = missionController.visualItems
if (visualItems && visualItems.count !== 1) { if (visualItems && visualItems.count !== 1) {
......
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