mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
AllPlotWindow - add average power to the end of the selection name only if not zero
It's annoying when there is no power
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user