From 2bf6f4e45ddf943d1091b67bf4c03dc43d2032db Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 28 Feb 2016 15:49:21 +0100 Subject: QML UI: ensure that after a dive edit the profile is redrawn Normally this is triggered when the DiveDetailsView component is completed, but since QML isn't recreating this component unless we switch to a dive a couple of spots in the dive list away from this one, we wouldn't get any changes in the data reflected in the profile. But since this now redraws the same dive that potentially was drawn last, we need to make sure we call plotDive() with force=true. I also suspect that this could help with the strange bug that sometimes we show a blank profile after certain edits. See #1013 Signed-off-by: Dirk Hohndel --- qt-mobile/qml/DiveDetailsEdit.qml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-mobile/qml') diff --git a/qt-mobile/qml/DiveDetailsEdit.qml b/qt-mobile/qml/DiveDetailsEdit.qml index c2f468d98..dc816665e 100644 --- a/qt-mobile/qml/DiveDetailsEdit.qml +++ b/qt-mobile/qml/DiveDetailsEdit.qml @@ -32,6 +32,9 @@ Item { detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, detailsEdit.suitText, detailsEdit.buddyText, detailsEdit.divemasterText, detailsEdit.weightText, detailsEdit.notesText, detailsEdit.startpressureText, detailsEdit.endpressureText, detailsEdit.gasmixText) + // trigger the profile to be redrawn + QMLProfile.diveId = dive_id + // apply the changes to the dive detail view - since the edit could have changed the order // first make sure that we are looking at the correct dive - our model allows us to look // up the index based on the unique dive_id -- cgit v1.2.3-70-g09d2