mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
DiveDetailsEdit: make sure model data exists
This gets rid of TypeError messages, but does not appear to affect behaviour qrc:///qml/DiveDetailsEdit.qml:254: TypeError: Cannot read property 'dive' of null qrc:///qml/DiveDetailsEdit.qml:228: TypeError: Cannot read property 'dive' of null qrc:///qml/DiveDetailsEdit.qml:216: TypeError: Cannot read property 'dive' of null qrc:///qml/DiveDetailsEdit.qml:204: TypeError: Cannot read property 'dive' of null Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
This commit is contained in:
parent
00e401b61f
commit
7e4ba965d1
1 changed files with 8 additions and 4 deletions
|
@ -201,7 +201,8 @@ Item {
|
|||
}
|
||||
HintsTextEdit {
|
||||
id: suitBox
|
||||
model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.suitList : null
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
diveDetailsListView.currentItem.modelData.dive.suitList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -213,7 +214,8 @@ Item {
|
|||
}
|
||||
HintsTextEdit {
|
||||
id: buddyBox
|
||||
model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.buddyList : null
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
diveDetailsListView.currentItem.modelData.dive.buddyList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -225,7 +227,8 @@ Item {
|
|||
}
|
||||
HintsTextEdit {
|
||||
id: divemasterBox
|
||||
model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.divemasterList : null
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
diveDetailsListView.currentItem.modelData.dive.divemasterList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
@ -251,7 +254,8 @@ Item {
|
|||
}
|
||||
HintsTextEdit {
|
||||
id: cylinderBox
|
||||
model: diveDetailsListView.currentItem ? diveDetailsListView.currentItem.modelData.dive.cylinderList : null
|
||||
model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ?
|
||||
diveDetailsListView.currentItem.modelData.dive.cylinderList : null
|
||||
inputMethodHints: Qt.ImhNoPredictiveText
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue