QML UI: don't show an odd profile for zero duration dive

A dive with zero duration creates an odd profile that is 2min 30seconds
long and looks just weird. Instead, simply show a text that there is on
profile shown for such a dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-02-14 16:27:41 -08:00
parent 06ad45c48f
commit a3189a9b3e

View file

@ -111,6 +111,7 @@ Item {
QMLProfile {
id: qmlProfile
visible: !dive.noDive
Layout.fillWidth: true
Layout.preferredHeight: Layout.minimumHeight
Layout.minimumHeight: width * 0.75
@ -125,6 +126,15 @@ Item {
anchors.fill: parent
}
}
MobileComponents.Label {
id: noProfile
visible: dive.noDive
Layout.fillWidth: true
Layout.columnSpan: 4
Layout.margins: MobileComponents.Units.gridUnit
horizontalAlignment: Text.AlignHCenter
text: "No profile show for empty dive"
}
}
GridLayout {
id: bottomLayout