From b68be8e9fed4a14bb5fb8c198515a25fd0822a18 Mon Sep 17 00:00:00 2001 From: hm Date: Mon, 13 Jun 2022 15:44:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=88=AA=E7=82=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=8C=E9=80=9F=E5=BA=A6=E5=B0=8F=E4=BA=8E3?= =?UTF-8?q?=E7=AE=97=E6=98=AF=E9=A9=AC=E8=B5=AB=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opmap/mapwidget/waypointitem.cpp | 36 ++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/opmap/mapwidget/waypointitem.cpp b/opmap/mapwidget/waypointitem.cpp index cba8fe6..ac7901e 100644 --- a/opmap/mapwidget/waypointitem.cpp +++ b/opmap/mapwidget/waypointitem.cpp @@ -419,19 +419,47 @@ void WayPointItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti break; case -2: _h.append(tr("Vz\n")); - _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + if(property.param4 <= 3) + { + _v = tr("Ma: %1").arg(QString::number(property.param4,'f',2)); + } + else + { + _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + } break; case -3: _h.append(tr("onAB\n")); - _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + if(property.param4 <= 3) + { + _v = tr("Ma: %1").arg(QString::number(property.param4,'f',2)); + } + else + { + _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + } break; case -4: _h.append(tr("offAB\n")); - _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + if(property.param4 <= 3) + { + _v = tr("Ma: %1").arg(QString::number(property.param4,'f',2)); + } + else + { + _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + } break; default: _h.append(tr("unknow\n")); - _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + if(property.param4 <= 3) + { + _v = tr("Ma: %1").arg(QString::number(property.param4,'f',2)); + } + else + { + _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0)); + } break; } }