diff --git a/src/AutoPilotPlugins/PX4/AirframeComponent.qml b/src/AutoPilotPlugins/PX4/AirframeComponent.qml index 1508026a195f25308fdb468206481db9f3e94957..d8affe7cd19dea1d6817ddc1fa2ac273ac3e292a 100644 --- a/src/AutoPilotPlugins/PX4/AirframeComponent.qml +++ b/src/AutoPilotPlugins/PX4/AirframeComponent.qml @@ -229,6 +229,7 @@ Your vehicle will also be restarted in order to complete the process.") anchors.left: parent.left anchors.right: parent.right model: modelData.airframes + textRole: "text" Component.onCompleted: { if (airframeCheckBox.checked) { diff --git a/src/QmlControls/QGCComboBox.qml b/src/QmlControls/QGCComboBox.qml index 8a02e764245623543f28e95fd1770bcba6994233..2b918c95ae17151e54e3f285bbd50f19d30d09cd 100644 --- a/src/QmlControls/QGCComboBox.qml +++ b/src/QmlControls/QGCComboBox.qml @@ -37,7 +37,15 @@ ComboBox { width: control.width contentItem: Text { - text: textRole ? modelData[textRole] : modelData + text: { + if(modelData) { + return textRole ? modelData[textRole] : modelData + } + else { + console.warn("ComboBox: no model data") + return "" + } + } color: control.currentIndex === index ? qgcPal.buttonHighlightText : qgcPal.buttonText verticalAlignment: Text.AlignVCenter }