summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-14 16:27:41 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-14 16:27:41 -0800
commita3189a9b3ea8c3af13ca0c7c3fcfb3da42da787d (patch)
tree260b08e5456281312e173e1f674ee96be96b7b83 /qt-mobile
parent06ad45c48f942738c0647ccc4f01d79e6a287e2e (diff)
downloadsubsurface-a3189a9b3ea8c3af13ca0c7c3fcfb3da42da787d.tar.gz
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>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qml/DiveDetailsView.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-mobile/qml/DiveDetailsView.qml b/qt-mobile/qml/DiveDetailsView.qml
index 7e678c5c3..56d524f1f 100644
--- a/qt-mobile/qml/DiveDetailsView.qml
+++ b/qt-mobile/qml/DiveDetailsView.qml
@@ -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