mobile: do not call plotDive during startup

Check in profile if visible before calling plotDive

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-06-08 21:43:01 +02:00 committed by Dirk Hohndel
parent 0acda9a509
commit e993d4f005

View file

@ -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();
}
}
}