From 9ce96498eb481f8a353d0712934f83d3a0e42ee7 Mon Sep 17 00:00:00 2001 From: Volker Krause Date: Sat, 12 Jan 2019 22:07:45 +0100 Subject: [PATCH] Fix arrival/departure mix-up This should fix another high frequency polling loop, and fix the visual update glitches when new data arrives. --- src/app/livedatamanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/livedatamanager.cpp b/src/app/livedatamanager.cpp index b0f53ac..33d7c75 100644 --- a/src/app/livedatamanager.cpp +++ b/src/app/livedatamanager.cpp @@ -230,8 +230,8 @@ void LiveDataManager::checkTrainTrip(const QVariant &res, const QString& resId) void LiveDataManager::updateArrivalData(const KPublicTransport::Departure &arr, const QString &resId) { - const auto oldArr = m_departures.value(resId).change; - m_departures.insert(resId, {arr, QDateTime::currentDateTimeUtc()}); + const auto oldArr = m_arrivals.value(resId).change; + m_arrivals.insert(resId, {arr, QDateTime::currentDateTimeUtc()}); storePublicTransportData(resId, arr, QStringLiteral("arrival")); // check if we can update static information in the reservation with what we received -- 2.24.0