Skip to content

Commit

Permalink
Histogram Chart - setIsBlank when data series is not available
Browse files Browse the repository at this point in the history
Changes isDataPresent to check for derived series wattsKg and wbal
Fixes #4238
  • Loading branch information
amtriathlon committed Jul 7, 2022
1 parent 086be52 commit cb1e59f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Charts/HistogramWindow.cpp
Expand Up @@ -995,7 +995,7 @@ HistogramWindow::updateChart()

// If no data present show the blank state page
if (!rangemode) {
if (rideItem() != NULL)
if (rideItem() && rideItem()->ride() && rideItem()->ride()->isDataPresent(series))
setIsBlank(false);
else
setIsBlank(true);
Expand Down
2 changes: 2 additions & 0 deletions src/FileIO/RideFile.cpp
Expand Up @@ -1738,6 +1738,8 @@ RideFile::isDataPresent(SeriesType series)
case kph : return dataPresent.kph; break;
case nmd :
case nm : return dataPresent.nm; break;
case wbal :
case wattsKg :
case wattsd :
case watts : return dataPresent.watts; break;
case aPower : return dataPresent.apower; break;
Expand Down

0 comments on commit cb1e59f

Please sign in to comment.