From 2f7deb1b66645b4b88204d1048621bd06e3ce472 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Fri, 21 Jul 2017 09:11:11 -0700 Subject: [PATCH] Stack callsign below altitude --- src/FlightMap/MapItems/VehicleMapItem.qml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/FlightMap/MapItems/VehicleMapItem.qml b/src/FlightMap/MapItems/VehicleMapItem.qml index b914ebfc4..b4c4d432a 100644 --- a/src/FlightMap/MapItems/VehicleMapItem.qml +++ b/src/FlightMap/MapItems/VehicleMapItem.qml @@ -57,6 +57,7 @@ MapQuickItem { } QGCMapLabel { + id: vehicleLabel anchors.top: parent.bottom anchors.horizontalCenter: parent.horizontalCenter map: _map @@ -66,10 +67,21 @@ MapQuickItem { property string vehicleLabelText: visible ? (_adsbVehicle ? - callsign + " " + QGroundControl.metersToAppSettingsDistanceUnits(altitude).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString : + QGroundControl.metersToAppSettingsDistanceUnits(altitude).toFixed(0) + " " + QGroundControl.appSettingsDistanceUnitsString : (_multiVehicle ? qsTr("Vehicle %1").arg(vehicle.id) : "")) : "" } + + QGCMapLabel { + anchors.top: vehicleLabel.bottom + anchors.horizontalCenter: parent.horizontalCenter + map: _map + text: vehicleLabelText + font.pointSize: ScreenTools.smallFontPointSize + visible: _adsbVehicle ? !isNaN(altitude) : _multiVehicle + + property string vehicleLabelText: visible && _adsbVehicle ? callsign : "" + } } } -- 2.22.0