Commit 9e45ab31 authored by Stefan Dunca's avatar Stefan Dunca

Fix combobox usage

parent f6e72014
......@@ -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) {
......
......@@ -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
}
......
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