Update divelist when changing units

We need to explicitly refresh the divelist when switching between
metric and imperial unit systems. Or the changes will not be visible until
we restart the app or scroll outside of what's in the current cache.
This will update both the divelist view and the dive profiles to show the new units.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
Jocke 2018-09-20 20:21:29 +02:00 committed by Dirk Hohndel
parent 9c8deef477
commit 5b37d87e2d

View file

@ -364,6 +364,7 @@ Kirigami.ScrollablePage {
onClicked: {
PrefUnits.set_unit_system("imperial")
manager.changesNeedSaving()
manager.refreshDiveList()
}
}
Controls.Label {
@ -378,6 +379,7 @@ Kirigami.ScrollablePage {
onClicked: {
PrefUnits.set_unit_system("metric")
manager.changesNeedSaving()
manager.refreshDiveList()
}
}
}