1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01: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; QLocale l;
_s1 = l.toString(date.date(), QLocale::ShortFormat); _s1 = l.toString(date.date(), QLocale::ShortFormat);
_s2 = l.toString(date.time(), QLocale::ShortFormat); _s2 = date.time().toString("h:m:s");
updateBoundingRect(); updateBoundingRect();
} }

View File

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