Commit 90548f3e authored by David Redondo's avatar David Redondo 🏎
Browse files

Fix crash with text face

A binding involving the two arrays won't update when we change just the
contents of the arrays so we crashed later in QQmlData::wasDeleted when
trying to access the objects which were inside but deleted.
parent 32aefe5b
......@@ -104,8 +104,14 @@ ColumnLayout {
Sensors.Sensor { sensorId: modelData }
onObjectAdded: root.highPrioritySensors.push(object)
onObjectRemoved: root.highPrioritySensors.splice(root.highPrioritySensors.indexOf(object), 1)
onObjectAdded: {
root.highPrioritySensors.push(object)
root.highPrioritySensors = root.highPrioritySensors
}
onObjectRemoved: {
root.highPrioritySensors.splice(root.highPrioritySensors.indexOf(object), 1)
root.highPrioritySensors = root.highPrioritySensors
}
}
Instantiator {
......@@ -113,7 +119,13 @@ ColumnLayout {
Sensors.Sensor { sensorId: modelData }
onObjectAdded: root.lowPrioritySensors.push(object)
onObjectRemoved: root.lowPrioritySensors.splice(root.lowPrioritySensors.indexOf(object), 1)
onObjectAdded: {
root.lowPrioritySensors.push(object)
root.lowPrioritySensors = root.lowPrioritySensors
}
onObjectRemoved: {
root.lowPrioritySensors.splice(root.lowPrioritySensors.indexOf(object), 1)
root.lowPrioritySensors = root.lowPrioritySensors
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment