diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index e84cf843e..a30984a9a 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -52,7 +52,8 @@ Kirigami.Page { property alias cylinderModel3: detailsEdit.cylinderModel3 property alias cylinderModel4: detailsEdit.cylinderModel4 - title: currentItem && currentItem.modelData ? currentItem.modelData.location : qsTr("Dive details") + title: currentItem && currentItem.modelData && currentItem.modelData.location && "" !== currentItem.modelData.location ? + currentItem.modelData.location : qsTr("Dive details") state: "view" leftPadding: 0 topPadding: Kirigami.Units.gridUnit / 2 diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index 4febf688b..ee3b0902e 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -36,7 +36,7 @@ Item { anchors.left: parent.left Controls.Label { id: locationText - text: location + text: (undefined !== location && "" !== location) ? location : qsTr("") font.weight: Font.Bold font.pointSize: subsurfaceTheme.titlePointSize wrapMode: Text.WrapAtWordBoundaryOrAnywhere diff --git a/mobile-widgets/qml/DiveList.qml b/mobile-widgets/qml/DiveList.qml index 07fd7ba4e..d4173d5f7 100644 --- a/mobile-widgets/qml/DiveList.qml +++ b/mobile-widgets/qml/DiveList.qml @@ -155,7 +155,7 @@ Kirigami.ScrollablePage { anchors.left: leftBarDive.right Controls.Label { id: locationText - text: (undefined !== location) ? location : "" + text: (undefined !== location && "" != location) ? location : qsTr("") font.weight: Font.Bold font.pointSize: subsurfaceTheme.regularPointSize elide: Text.ElideRight