From 6178df97cfd139fb666c312f55ec3059739ae158 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 14 Jun 2022 00:44:18 +0200 Subject: [PATCH] Fix power balance stats sometimes not being initialized properly --- nymea-app/ui/mainviews/energy/PowerBalanceStats.qml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml b/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml index 1ed89037..9da5b7fb 100644 --- a/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml +++ b/nymea-app/ui/mainviews/energy/PowerBalanceStats.qml @@ -439,7 +439,7 @@ StatsBase { color: Style.blue } Label { - text: d.consumptionSet ? qsTr("Consumed: %1 kWh").arg(d.consumptionSet.at(toolTip.idx).toFixed(2)) : "" + text: toolTip.visible && d.consumptionSet ? qsTr("Consumed: %1 kWh").arg(d.consumptionSet.at(toolTip.idx).toFixed(2)) : "" font: Style.extraSmallFont } } @@ -451,7 +451,7 @@ StatsBase { color: Style.yellow } Label { - text: d.productionSet ? qsTr("Produced: %1 kWh").arg(d.productionSet.at(toolTip.idx).toFixed(2)) : "" + text: toolTip.visible && d.productionSet ? qsTr("Produced: %1 kWh").arg(d.productionSet.at(toolTip.idx).toFixed(2)) : "" font: Style.extraSmallFont } } @@ -462,7 +462,7 @@ StatsBase { color: Style.red } Label { - text: d.acquisitionSet ? qsTr("From grid: %1 kWh").arg(d.acquisitionSet.at(toolTip.idx).toFixed(2)) : "" + text: toolTip.visible && d.acquisitionSet ? qsTr("From grid: %1 kWh").arg(d.acquisitionSet.at(toolTip.idx).toFixed(2)) : "" font: Style.extraSmallFont } } @@ -473,7 +473,7 @@ StatsBase { color: Style.green } Label { - text: d.returnSet ? qsTr("To grid: %1 kWh").arg(d.returnSet.at(toolTip.idx).toFixed(2)) : "" + text: toolTip.visible && d.returnSet ? qsTr("To grid: %1 kWh").arg(d.returnSet.at(toolTip.idx).toFixed(2)) : "" font: Style.extraSmallFont } }