diff options
author | jan Iversen <jani@libreoffice.org> | 2018-06-08 21:43:01 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-09 17:16:53 +0200 |
commit | e993d4f005e62c12765e2e45342ecf840476e3bf (patch) | |
tree | 8f015071d52eca7c948e6e51652ebaa09bda8348 /mobile-widgets/qml/DiveDetailsView.qml | |
parent | 0acda9a5099ef5a9125f22ce2d02c4aaa1093f4e (diff) | |
download | subsurface-e993d4f005e62c12765e2e45342ecf840476e3bf.tar.gz |
mobile: do not call plotDive during startup
Check in profile if visible before calling plotDive
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qml/DiveDetailsView.qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetailsView.qml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index bb7a10019..3237fe6f6 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -217,6 +217,13 @@ Item { border.color: subsurfaceTheme.primaryColor anchors.fill: parent } + + onVisibleChanged: { + if (visible) { + qmlProfile.diveId = model.dive.id; + qmlProfile.update(); + } + } } Controls.Label { id: noProfile @@ -397,8 +404,6 @@ Item { } Component.onCompleted: { qmlProfile.setMargin(Kirigami.Units.smallSpacing) - qmlProfile.diveId = model.dive.id; - qmlProfile.update(); } } } |