summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DiveDetailsView.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@libreoffice.org>2018-06-08 21:43:01 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-09 17:16:53 +0200
commite993d4f005e62c12765e2e45342ecf840476e3bf (patch)
tree8f015071d52eca7c948e6e51652ebaa09bda8348 /mobile-widgets/qml/DiveDetailsView.qml
parent0acda9a5099ef5a9125f22ce2d02c4aaa1093f4e (diff)
downloadsubsurface-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.qml9
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();
}
}
}