mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
06ad45c48f
commit
a3189a9b3e
1 changed files with 10 additions and 0 deletions
|
@ -111,6 +111,7 @@ Item {
|
||||||
|
|
||||||
QMLProfile {
|
QMLProfile {
|
||||||
id: qmlProfile
|
id: qmlProfile
|
||||||
|
visible: !dive.noDive
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Layout.minimumHeight
|
Layout.preferredHeight: Layout.minimumHeight
|
||||||
Layout.minimumHeight: width * 0.75
|
Layout.minimumHeight: width * 0.75
|
||||||
|
@ -125,6 +126,15 @@ Item {
|
||||||
anchors.fill: parent
|
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 {
|
GridLayout {
|
||||||
id: bottomLayout
|
id: bottomLayout
|
||||||
|
|
Loading…
Add table
Reference in a new issue