1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 09:05:14 +01:00

A better handling of missing/invalid dates

This commit is contained in:
Martin Tůma 2021-02-13 23:44:48 +01:00
parent c24b437769
commit c8e2baba68

View File

@ -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()));
}