show timeshift if not zero

This commit is contained in:
Milos Kozak 2017-11-07 13:24:08 +01:00
parent 5ad564e0e3
commit 0af51bb6ea

View file

@ -72,7 +72,10 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
name = DecimalFormatter.to2Decimal(getProfileObject().percentageBasalSum()) + "U ";
}
if (isCPP) {
name += "(" + percentage + "%," + timeshift + "h)";
name += "(" + percentage + "%";
if (timeshift != 0)
name += "," + timeshift + "h";
name += ")";
}
return name;
}