From f791f5308f30fe05c7c072a36355f26a6f33e0ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Karas?= Date: Sun, 27 Oct 2024 00:16:46 +0200 Subject: [PATCH 1/2] typo --- .../include/osmscoutclientqt/NavigationModel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libosmscout-client-qt/include/osmscoutclientqt/NavigationModel.h b/libosmscout-client-qt/include/osmscoutclientqt/NavigationModel.h index d072f6a56..20f745309 100644 --- a/libosmscout-client-qt/include/osmscoutclientqt/NavigationModel.h +++ b/libosmscout-client-qt/include/osmscoutclientqt/NavigationModel.h @@ -53,7 +53,7 @@ class OSMSCOUT_CLIENT_QT_API NavigationModel : public QAbstractListModel Q_PROPERTY(bool positionEstimateInTunnel READ getPositionEstimateInTunnel NOTIFY positionEstimateInTunnelChanged) Q_PROPERTY(QDateTime arrivalEstimate READ getArrivalEstimate NOTIFY arrivalUpdate) - Q_PROPERTY(double remainingDistance READ getRemainingDinstance NOTIFY arrivalUpdate) + Q_PROPERTY(double remainingDistance READ getRemainingDistance NOTIFY arrivalUpdate) // km/h, <0 when unknown Q_PROPERTY(double currentSpeed READ getCurrentSpeed NOTIFY currentSpeedUpdate) @@ -180,7 +180,7 @@ public slots: return arrivalEstimate; } - inline double getRemainingDinstance() const + inline double getRemainingDistance() const { if (!remainingDistance.has_value()){ return 0; From d4f327e5963722882ff6d1192ed706238e0bcc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Karas?= Date: Sun, 27 Oct 2024 00:29:55 +0200 Subject: [PATCH 2/2] reset suggested lanes on route change --- libosmscout-client-qt/src/osmscoutclientqt/NavigationModel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libosmscout-client-qt/src/osmscoutclientqt/NavigationModel.cpp b/libosmscout-client-qt/src/osmscoutclientqt/NavigationModel.cpp index 8b9da5475..6a72478ef 100644 --- a/libosmscout-client-qt/src/osmscoutclientqt/NavigationModel.cpp +++ b/libosmscout-client-qt/src/osmscoutclientqt/NavigationModel.cpp @@ -248,6 +248,7 @@ void NavigationModel::setRoute(QObject *o) } arrivalEstimate=QDateTime(); remainingDistance=std::nullopt; + lane=LaneAgent::Lane(); endResetModel(); emit arrivalUpdate(); @@ -255,6 +256,7 @@ void NavigationModel::setRoute(QObject *o) emit vehiclePositionChanged(); emit positionEstimateInTunnelChanged(); emit update(); + emit laneUpdate(); emit currentSpeedUpdate(0); emit maxAllowedSpeedUpdate(0); }