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:
parent
9c8deef477
commit
5b37d87e2d
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user