mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-07 12:05:14 +01:00
A better handling of missing/invalid dates
This commit is contained in:
parent
c24b437769
commit
c8e2baba68
@ -295,6 +295,8 @@ void PathItem::setMarkerInfo(qreal pos)
|
|||||||
QDateTime d(date());
|
QDateTime d(date());
|
||||||
if (!std::isnan(time) && d.isValid())
|
if (!std::isnan(time) && d.isValid())
|
||||||
_markerInfo->setDate(d.addSecs(time).toTimeZone(_timeZone));
|
_markerInfo->setDate(d.addSecs(time).toTimeZone(_timeZone));
|
||||||
|
else
|
||||||
|
_markerInfo->setDate(QDateTime());
|
||||||
} else if (_markerInfoType == MarkerInfoItem::Position)
|
} else if (_markerInfoType == MarkerInfoItem::Position)
|
||||||
_markerInfo->setCoordinates(_map->xy2ll(_marker->pos()));
|
_markerInfo->setCoordinates(_map->xy2ll(_marker->pos()));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user