Commit 16dc79fc authored by dogmaphobic's avatar dogmaphobic

Eliminating some QML errors when the application is shutting down.

parent 93f7147b
...@@ -39,7 +39,7 @@ MapQuickItem { ...@@ -39,7 +39,7 @@ MapQuickItem {
anchorPoint.x: vehicleIcon.width / 2 anchorPoint.x: vehicleIcon.width / 2
anchorPoint.y: vehicleIcon.height / 2 anchorPoint.y: vehicleIcon.height / 2
visible: vehicle.coordinateValid visible: vehicle && vehicle.coordinateValid
sourceItem: Image { sourceItem: Image {
id: vehicleIcon id: vehicleIcon
...@@ -51,7 +51,7 @@ MapQuickItem { ...@@ -51,7 +51,7 @@ MapQuickItem {
transform: Rotation { transform: Rotation {
origin.x: vehicleIcon.width / 2 origin.x: vehicleIcon.width / 2
origin.y: vehicleIcon.height / 2 origin.y: vehicleIcon.height / 2
angle: vehicle.heading angle: vehicle ? vehicle.heading : 0
} }
} }
} }
...@@ -58,10 +58,12 @@ Row { ...@@ -58,10 +58,12 @@ Row {
return colorOrange; return colorOrange;
if (activeVehicle.messageTypeError) if (activeVehicle.messageTypeError)
return colorRed; 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 //-- It can only get here when closing (vehicle gone while window active)
console.log("Invalid vehicle message type") return "white";
return "purple";
} }
function getBatteryVoltageText() { function getBatteryVoltageText() {
......
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