1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 06:43:22 +02:00

Always show the seconds in times

This commit is contained in:
Martin Tůma 2024-09-05 07:34:27 +02:00
parent 96044fd8da
commit b53da040b5
2 changed files with 6 additions and 4 deletions

View File

@ -26,7 +26,7 @@ void MarkerInfoItem::setDate(const QDateTime &date)
QLocale l;
_s1 = l.toString(date.date(), QLocale::ShortFormat);
_s2 = l.toString(date.time(), QLocale::ShortFormat);
_s2 = date.time().toString("h:m:s");
updateBoundingRect();
}

View File

@ -32,10 +32,12 @@ ToolTip WaypointItem::info() const
val += " (" + Format::elevation(elevations.second, _units) + ")";
tt.insert(qApp->translate("WaypointItem", "Elevation"), val);
}
if (_waypoint.timestamp().isValid())
if (_waypoint.timestamp().isValid()) {
QDateTime date(_waypoint.timestamp().toTimeZone(_timeZone));
tt.insert(qApp->translate("WaypointItem", "Date"),
l.toString(_waypoint.timestamp().toTimeZone(_timeZone),
QLocale::ShortFormat));
l.toString(date.date(), QLocale::ShortFormat) + " "
+ date.time().toString("h:m:s"));
}
if (!_waypoint.description().isEmpty())
tt.insert(qApp->translate("WaypointItem", "Description"),
_waypoint.description());