1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
6ce0b03295 Remove the items fromthe scene before setting the scene rect to 0-size
Qt 6.7 draws the message item over the tab bar when it is present when shrinking
the scene rect. Clear all the items when clearing the scene as a workaround.
2024-05-28 23:37:25 +02:00
3d01424f44 Use consistent Date format across the whole GUI 2024-05-28 21:34:40 +02:00
3 changed files with 19 additions and 10 deletions

View File

@ -442,6 +442,15 @@ void GraphView::clear()
_sliderPos = 0;
_zoom = 1.0;
removeItem(_xAxis);
removeItem(_yAxis);
removeItem(_xAxisLabel);
removeItem(_yAxisLabel);
removeItem(_slider);
removeItem(_info);
removeItem(_grid);
removeItem(_message);
_scene->setSceneRect(0, 0, 0, 0);
}

View File

@ -1307,14 +1307,14 @@ void GUI::statistics()
+ l.toString(_areaCount) + "<br>");
if (_dateRange.first.isValid()) {
QString format = l.dateFormat(QLocale::ShortFormat);
if (_dateRange.first == _dateRange.second)
text.append("<b>" + tr("Date") + ":</b> "
+ _dateRange.first.toString(format) + "<br>");
+ l.toString(_dateRange.first, QLocale::ShortFormat) + "<br>");
else
text.append("<b>" + tr("Date") + ":</b> "
+ QString("%1 - %2").arg(_dateRange.first.toString(format),
_dateRange.second.toString(format)) + "<br>");
+ QString("%1 - %2").arg(l.toString(_dateRange.first,
QLocale::NarrowFormat), l.toString(_dateRange.second,
QLocale::NarrowFormat)) + "<br>");
}
if (distance() > 0)
@ -1372,14 +1372,13 @@ void GUI::statistics()
if (_dateRange.first.isValid()) {
if (_dateRange.first == _dateRange.second) {
QString format = l.dateFormat(QLocale::LongFormat);
text.append("<tr><td>" + tr("Date") + ":</td><td>"
+ _dateRange.first.toString(format) + "</td></tr>");
+ l.toString(_dateRange.first, QLocale::ShortFormat) + "</td></tr>");
} else {
QString format = l.dateFormat(QLocale::ShortFormat);
text.append("<tr><td>" + tr("Date") + ":</td><td>"
+ QString("%1 - %2").arg(_dateRange.first.toString(format),
_dateRange.second.toString(format)) + "</td></tr>");
+ QString("%1 - %2").arg(l.toString(_dateRange.first,
QLocale::NarrowFormat), l.toString(_dateRange.second,
QLocale::NarrowFormat)) + "</td></tr>");
}
}

View File

@ -24,7 +24,8 @@ ToolTip TrackItem::info() const
if (_movingTime > 0)
tt.insert(tr("Moving time"), Format::timeSpan(_movingTime));
if (!_date.isNull())
tt.insert(tr("Date"), l.toString(_date.toTimeZone(_timeZone)));
tt.insert(tr("Date"), l.toString(_date.toTimeZone(_timeZone),
QLocale::ShortFormat));
if (!_links.isEmpty()) {
QString links;
for (int i = 0; i < _links.size(); i++) {