Browse Source

Eliminating some QML errors when the application is shutting down.

QGC4.4
dogmaphobic 10 years ago
parent
commit
16dc79fc9f
  1. 4
      src/FlightMap/MapItems/VehicleMapItem.qml
  2. 8
      src/ui/toolbar/MainToolBarIndicators.qml

4
src/FlightMap/MapItems/VehicleMapItem.qml

@ -39,7 +39,7 @@ MapQuickItem { @@ -39,7 +39,7 @@ MapQuickItem {
anchorPoint.x: vehicleIcon.width / 2
anchorPoint.y: vehicleIcon.height / 2
visible: vehicle.coordinateValid
visible: vehicle && vehicle.coordinateValid
sourceItem: Image {
id: vehicleIcon
@ -51,7 +51,7 @@ MapQuickItem { @@ -51,7 +51,7 @@ MapQuickItem {
transform: Rotation {
origin.x: vehicleIcon.width / 2
origin.y: vehicleIcon.height / 2
angle: vehicle.heading
angle: vehicle ? vehicle.heading : 0
}
}
}

8
src/ui/toolbar/MainToolBarIndicators.qml

@ -58,10 +58,12 @@ Row { @@ -58,10 +58,12 @@ Row {
return colorOrange;
if (activeVehicle.messageTypeError)
return colorRed;
// Cannot be so make make it obnoxious to show error
console.log("Invalid vehicle message type")
return "purple";
}
// Cannot be so make make it obnoxious to show error
console.log("Invalid vehicle message type")
return "purple";
//-- It can only get here when closing (vehicle gone while window active)
return "white";
}
function getBatteryVoltageText() {

Loading…
Cancel
Save