From c8e2baba682da7fa6b8eab2b6665bbe6761637fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 13 Feb 2021 23:44:48 +0100 Subject: [PATCH] A better handling of missing/invalid dates --- src/GUI/pathitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GUI/pathitem.cpp b/src/GUI/pathitem.cpp index ad4fa588..75694f61 100644 --- a/src/GUI/pathitem.cpp +++ b/src/GUI/pathitem.cpp @@ -295,6 +295,8 @@ void PathItem::setMarkerInfo(qreal pos) QDateTime d(date()); if (!std::isnan(time) && d.isValid()) _markerInfo->setDate(d.addSecs(time).toTimeZone(_timeZone)); + else + _markerInfo->setDate(QDateTime()); } else if (_markerInfoType == MarkerInfoItem::Position) _markerInfo->setCoordinates(_map->xy2ll(_marker->pos())); }