aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml2
-rw-r--r--mobile-widgets/qml/DiveDetailsEdit.qml8
2 files changed, 5 insertions, 5 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 4f30ff6cb..096482c2d 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -49,7 +49,7 @@ Kirigami.Page {
target: diveDetailsPage;
actions {
right: deleteAction
- left: diveDetailsListView.currentItem.modelData.dive.gps !== "" ? mapAction : null
+ left: diveDetailsListView.currentItem ? (diveDetailsListView.currentItem.modelData.dive.gps !== "" ? mapAction : null) : null
}
}
PropertyChanges { target: detailsEditScroll; opened: false }
diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml
index b4584185d..8a0e62c67 100644
--- a/mobile-widgets/qml/DiveDetailsEdit.qml
+++ b/mobile-widgets/qml/DiveDetailsEdit.qml
@@ -163,7 +163,7 @@ Item {
ComboBox {
id: suitBox
editable: true
- model: diveDetailsListView.currentItem.modelData.dive.suitList
+ model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.suitList : null
inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true
style: ComboBoxStyle {
@@ -178,7 +178,7 @@ Item {
ComboBox {
id: buddyBox
editable: true
- model: diveDetailsListView.currentItem.modelData.dive.buddyList
+ model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.buddyList : null
inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true
style: ComboBoxStyle {
@@ -193,7 +193,7 @@ Item {
ComboBox {
id: divemasterBox
editable: true
- model: diveDetailsListView.currentItem.modelData.dive.divemasterList
+ model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.divemasterList : null
inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true
style: ComboBoxStyle {
@@ -218,7 +218,7 @@ Item {
ComboBox {
id: cylinderBox
editable: true
- model: diveDetailsListView.currentItem.modelData.dive.cylinderList
+ model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.cylinderList : null
inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true
style: ComboBoxStyle {