Startup Analysis view select perspective

.. at startup the perspective selection logic for analysis
   view was not called and just defaulting to the first
   available perspective in the analysis view.
This commit is contained in:
Mark Liversedge
2021-07-06 17:23:17 +01:00
parent 20d34664e3
commit 73e174a982

View File

@@ -734,7 +734,9 @@ TabView::setPerspectives(QComboBox *perspectiveSelector)
// generally we just go to the first perspective
// but on analysis view they get selected on the basis
// of the currently selected ride
perspectiveSelected(0);
RideItem *notconst = (RideItem*)context->currentRideItem();
if (type == VIEW_ANALYSIS && notconst != NULL) setRide(notconst);
else perspectiveSelected(0);
// due to visibility optimisation we need to force the first tab to be selected in tab mode
if (perspective_->currentStyle == 0 && perspective_->charts.count()) perspective_->tabSelected(0);