Avoid qml errors on shutdown
This commit is contained in:
@@ -69,13 +69,13 @@ ColumnLayout {
|
|||||||
SpinBox {
|
SpinBox {
|
||||||
enabled: false
|
enabled: false
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
value: listView.currentData.id
|
value: listView.currentData ? listView.currentData.id : -1
|
||||||
onValueModified: listView.currentData.id = value
|
onValueModified: listView.currentData.id = value
|
||||||
}
|
}
|
||||||
Label { text: qsTr("Name:") }
|
Label { text: qsTr("Name:") }
|
||||||
TextField {
|
TextField {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: listView.currentData.name
|
text: listView.currentData ? listView.currentData.name : ''
|
||||||
onTextEdited: listView.currentData.name = text
|
onTextEdited: listView.currentData.name = text
|
||||||
}
|
}
|
||||||
Label { text: qsTr("Icon:") }
|
Label { text: qsTr("Icon:") }
|
||||||
@@ -103,7 +103,7 @@ ColumnLayout {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
|
||||||
deviceTypeId: listView.currentData.id
|
deviceTypeId: listView.currentData ? listView.currentData.id : -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
|
Reference in New Issue
Block a user