diff --git a/src/AllPlotWindow.cpp b/src/AllPlotWindow.cpp index b31b1721b..ce9deb26d 100644 --- a/src/AllPlotWindow.cpp +++ b/src/AllPlotWindow.cpp @@ -2057,8 +2057,9 @@ AllPlotWindow::setEndSelection(AllPlot* plot, double xValue, bool newInterval, Q if (bottom->text(0).startsWith(name)) delete allIntervals->takeChild(count-1); } - // add average power to the end of the selection name - name += QString("(%1 watts)").arg(round((wattsTotal && arrayLength) ? wattsTotal/arrayLength : 0)); + // add average power to the end of the selection name, if available + if (wattsTotal && arrayLength) + name += tr("(%1 watts)").arg(round(wattsTotal/arrayLength)); QTreeWidgetItem *last = new IntervalItem(ride->ride(), name, duration1, duration2, distance1, distance2, allIntervals->childCount()+1);