Browse Source

Merge pull request #7862 from DonLakeFlyer/QGCCombo

Fix textRole usage for QGCComboBox
QGC4.4
Don Gagne 5 years ago committed by GitHub
parent
commit
2fc9b3fe47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/AutoPilotPlugins/APM/APMCameraComponent.qml
  2. 9
      src/AutoPilotPlugins/APM/APMCameraSubComponent.qml
  3. 2
      src/AutoPilotPlugins/APM/APMLightsComponent.qml
  4. 1
      src/AutoPilotPlugins/APM/APMPowerComponent.qml
  5. 3
      src/QmlControls/PIDTuning.qml
  6. 1
      src/VehicleSetup/FirmwareUpgrade.qml
  7. 2
      src/ui/preferences/MavlinkSettings.qml

1
src/AutoPilotPlugins/APM/APMCameraComponent.qml

@ -272,6 +272,7 @@ SetupPage { @@ -272,6 +272,7 @@ SetupPage {
anchors.left: gimbalOutLabel.right
width: mountAngMinField.width
model: gimbalOutModel
textRole: "text"
currentIndex: gimbalOutIndex
onActivated: setRCFunction(gimbalOutModel.get(index).value, rcFunction)

9
src/AutoPilotPlugins/APM/APMCameraSubComponent.qml

@ -316,10 +316,11 @@ SetupPage { @@ -316,10 +316,11 @@ SetupPage {
}
QGCComboBox {
id: outputChan
width: servoPWMMinField.width
model: gimbalOutModel
currentIndex: gimbalOutIndex
id: outputChan
width: servoPWMMinField.width
model: gimbalOutModel
textRole: "text"
currentIndex: gimbalOutIndex
onActivated: setRCFunction(gimbalOutModel.get(index).value, rcFunction)
}

2
src/AutoPilotPlugins/APM/APMLightsComponent.qml

@ -191,6 +191,7 @@ SetupPage { @@ -191,6 +191,7 @@ SetupPage {
anchors.left: lightsStepLabel.right
width: ScreenTools.defaultFontPixelWidth * 15
model: lightsOutModel
textRole: "text"
currentIndex: lights1OutIndex
onActivated: setRCFunction(lightsOutModel.get(index).value, lights1Function)
@ -211,6 +212,7 @@ SetupPage { @@ -211,6 +212,7 @@ SetupPage {
anchors.left: lightsStepLabel.right
width: lights1Combo.width
model: lightsOutModel
textRole: "text"
currentIndex: lights2OutIndex
onActivated: setRCFunction(lightsOutModel.get(index).value, lights2Function)

1
src/AutoPilotPlugins/APM/APMPowerComponent.qml

@ -398,6 +398,7 @@ SetupPage { @@ -398,6 +398,7 @@ SetupPage {
id: sensorCombo
Layout.minimumWidth: _fieldWidth
model: sensorModel
textRole: "text"
onActivated: {
if (index < sensorModel.count - 1) {

3
src/QmlControls/PIDTuning.qml

@ -303,7 +303,8 @@ RowLayout { @@ -303,7 +303,8 @@ RowLayout {
QGCLabel { text: qsTr("Increment/Decrement %") }
QGCComboBox {
id: adjustPercentCombo
id: adjustPercentCombo
textRole: "text"
model: ListModel {
id: adjustPercentModel
ListElement { text: "5"; value: 0.05 }

1
src/VehicleSetup/FirmwareUpgrade.qml

@ -409,6 +409,7 @@ SetupPage { @@ -409,6 +409,7 @@ SetupPage {
anchors.right: parent.right
visible: px4Flow
model: px4FlowFirmwareList
textRole: "text"
currentIndex: _defaultFirmwareIsPX4 ? 0 : 1
}

2
src/ui/preferences/MavlinkSettings.qml

@ -513,6 +513,7 @@ Rectangle { @@ -513,6 +513,7 @@ Rectangle {
id: windCombo
width: _valueWidth
enabled: !_disableDataPersistence
textRole: "text"
model: ListModel {
id: windItems
ListElement { text: "Please Select"; value: -1 }
@ -550,6 +551,7 @@ Rectangle { @@ -550,6 +551,7 @@ Rectangle {
id: ratingCombo
width: _valueWidth
enabled: !_disableDataPersistence
textRole: "text"
model: ListModel {
id: ratingItems
ListElement { text: "Please Select"; value: "notset"}

Loading…
Cancel
Save