Minor improvements

This commit is contained in:
2023-02-18 21:42:50 +01:00
parent e56172f7de
commit a5bf5ec154
2 changed files with 5 additions and 5 deletions

View File

@ -70,13 +70,13 @@ ColumnLayout {
SpinBox {
enabled: false
Layout.fillWidth: true
value: listView.currentData.id
value: listView.currentData ? listView.currentData.id : -1
onValueModified: listView.currentData.id = value
}
Label { text: qsTr("Name:") }
TextField {
Layout.fillWidth: true
text: listView.currentData.name
text: listView.currentData ? listView.currentData.name : ''
onTextEdited: listView.currentData.name = text
}
Label { text: qsTr("DeviceType:") }
@ -92,12 +92,12 @@ ColumnLayout {
Label { text: qsTr("Address:") }
SpinBox {
Layout.fillWidth: true
value: listView.currentData.address
value: listView.currentData ? listView.currentData.address : -1
onValueModified: listView.currentData.address = value
}
Label { text: qsTr("Position:") }
Vector3DField {
id: test
id: positionField
Layout.fillWidth: true
onValueModified: listView.currentData.position = value;
// TODO solve without onCurrentDataChanged