Startup tiled view display fix (#4829)

This commit is contained in:
Paul Johnson
2026-02-26 19:38:34 +00:00
committed by GitHub
parent 58c5f75c7a
commit 2834b29167
4 changed files with 6 additions and 9 deletions

View File

@@ -1014,7 +1014,6 @@ bool ViewParser::startElement( const QString&, const QString&, const QString &na
type = static_cast<GcWinID>(typeStr.toInt());
chart = GcWindowRegistry::newGcWindow(type, context);
if (chart != NULL) {
chart->hide();
chart->setProperty("title", QVariant(title));
}
}

View File

@@ -220,15 +220,15 @@ AthleteTab::selectView(GcViewType viewType)
// ensure an initial viewChanged() event occurs for the navigation model, otherwise if the
// startup view is trends (value zero) the guard rejects the selection as views->currentIndex() is zero
if (startupViewChangeSent && views->currentIndex() == viewTypeToIndex(viewType)) return; // not changing
startupViewChangeSent = true;
// suspend screen updates while the view is changed.
views->setUpdatesEnabled(false);
emit viewChanged(viewType);
// first we deselect the current view
currentView()->setSelected(false);
// deselect the current view, but only after the initial selectView() call.
if (startupViewChangeSent) currentView()->setSelected(false);
startupViewChangeSent = true;
// now select the real one
views->setCurrentIndex(viewTypeToIndex(viewType));

View File

@@ -322,7 +322,7 @@ Perspective::configChanged(qint32)
tileArea->verticalScrollBar()->setStyleSheet(AbstractView::ourStyleSheet());
//#endif
QPalette palette;
palette.setBrush(backgroundRole(), viewType() == GcViewType::VIEW_TRAIN ? GColor(CTRAINPLOTBACKGROUND) : GColor(CPLOTBACKGROUND));
palette.setBrush(backgroundRole(), viewType_ == GcViewType::VIEW_TRAIN ? GColor(CTRAINPLOTBACKGROUND) : GColor(CPLOTBACKGROUND));
setPalette(palette);
tileWidget->setPalette(palette);
tileArea->setPalette(palette);
@@ -335,7 +335,7 @@ Perspective::configChanged(qint32)
if (charts[i]->type() == GcWindowTypes::Overview || charts[i]->type() == GcWindowTypes::OverviewTrends) chartbar->setColor(i, GColor(COVERVIEWBACKGROUND));
else if (charts[i]->type() == GcWindowTypes::UserAnalysis || charts[i]->type() == GcWindowTypes::UserTrends) chartbar->setColor(i, RGBColor(QColor(charts[i]->property("color").toString())));
else {
if (viewType() == GcViewType::VIEW_TRAIN) chartbar->setColor(i, GColor(CTRAINPLOTBACKGROUND));
if (viewType_ == GcViewType::VIEW_TRAIN) chartbar->setColor(i, GColor(CTRAINPLOTBACKGROUND));
else chartbar->setColor(i, GColor(CPLOTBACKGROUND));
}
}
@@ -739,7 +739,7 @@ Perspective::addChart(GcChartWindow* newone)
// tab colors
if (newone->type() == GcWindowTypes::Overview || newone->type() == GcWindowTypes::OverviewTrends) chartbar->setColor(chartnum, GColor(COVERVIEWBACKGROUND));
else {
if (viewType() == GcViewType::VIEW_TRAIN) chartbar->setColor(chartnum, GColor(CTRAINPLOTBACKGROUND));
if (viewType_ == GcViewType::VIEW_TRAIN) chartbar->setColor(chartnum, GColor(CTRAINPLOTBACKGROUND));
else chartbar->setColor(chartnum, GColor(CPLOTBACKGROUND));
}
@@ -796,7 +796,6 @@ Perspective::addChart(GcChartWindow* newone)
// add to the list
if (currentStyle == 2 && chartCursor >= 0) charts.insert(chartCursor, newone);
else charts.append(newone);
newone->hide();
// watch for moves etc
connect(newone, SIGNAL(resizing(GcWindow*)), this, SLOT(windowResizing(GcWindow*)));

View File

@@ -88,7 +88,6 @@ class LiveMapWebPageWindow : public GcChartWindow
QWebEngineView *view;
QWebEnginePage* webPage;
LiveMapWebPageWindow(); // default ctor
// setting dialog
QLabel* customUrlLabel;
QLabel* customLonLabel;