mobile-widgets/qml/divesummary.qml: detect change in units

When either length or volume unit is changed, the text needs to be
changed.

Let signal lengthChanged and volumeChanged cause a recalcation and therefore
new text.

Signed-off-by: jan Iversen <jan@casacondor.com>
This commit is contained in:
jan Iversen 2020-01-30 09:42:55 +01:00 committed by Dirk Hohndel
parent 636af40897
commit a65ec77263

View file

@ -15,6 +15,16 @@ Kirigami.ScrollablePage {
if (visible)
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
}
Connections {
target: Backend
onLengthChanged: {
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
}
onVolumeChanged: {
Backend.summaryCalculation(selectionPrimary.currentIndex, selectionSecondary.currentIndex)
}
}
GridLayout {
columns: 3