diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-02-28 15:49:21 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-28 16:46:50 +0100 |
commit | 2bf6f4e45ddf943d1091b67bf4c03dc43d2032db (patch) | |
tree | 9d6e9bf608d80a70b3f7c64df15d3f1027222ca1 /qt-mobile/qml | |
parent | 10af45d6dce8b02b17ea9a63342acb0b310b2c8f (diff) | |
download | subsurface-2bf6f4e45ddf943d1091b67bf4c03dc43d2032db.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml')
-rw-r--r-- | qt-mobile/qml/DiveDetailsEdit.qml | 3 |
1 files changed, 3 insertions, 0 deletions
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 |