Commit d487e995 authored by Don Gagne's avatar Don Gagne

Merge pull request #2111 from DonLakeFlyer/FMBind

Fix Flight Mode binding loop
parents 9efdddb2 4069ab9e
......@@ -260,7 +260,7 @@ QGCView {
thresholdValue: controller.manualModeThreshold
thresholdDragEnabled: false
onModeChannelIndexChanged: controller.manualModeChannelIndex = modeChannelIndex
onModeChannelIndexSelected: controller.manualModeChannelIndex = index
}
ModeSwitchDisplay {
......@@ -308,7 +308,7 @@ QGCView {
thresholdValue: controller.acroModeThreshold
thresholdDragEnabled: true
onModeChannelIndexChanged: controller.acroModeChannelIndex = modeChannelIndex
onModeChannelIndexSelected: controller.acroModeChannelIndex = index
onThresholdValueChanged: controller.acroModeThreshold = thresholdValue
Behavior on y { PropertyAnimation { easing.type: Easing.InOutQuad; duration: 1000 } }
......@@ -341,7 +341,7 @@ QGCView {
thresholdValue: controller.posCtlModeThreshold
thresholdDragEnabled: true
onModeChannelIndexChanged: controller.posCtlModeChannelIndex = modeChannelIndex
onModeChannelIndexSelected: controller.posCtlModeChannelIndex = index
onThresholdValueChanged: controller.posCtlModeThreshold = thresholdValue
Behavior on y { PropertyAnimation { easing.type: Easing.InOutQuad; duration: 1000 } }
......@@ -374,7 +374,7 @@ QGCView {
thresholdValue: controller.loiterModeThreshold
thresholdDragEnabled: true
onModeChannelIndexChanged: controller.loiterModeChannelIndex = modeChannelIndex
onModeChannelIndexSelected: controller.loiterModeChannelIndex = index
onThresholdValueChanged: controller.loiterModeThreshold = thresholdValue
Behavior on y { PropertyAnimation { easing.type: Easing.InOutQuad; duration: 1000 } }
......@@ -391,7 +391,7 @@ QGCView {
thresholdValue: controller.returnModeThreshold
thresholdDragEnabled: true
onModeChannelIndexChanged: controller.returnModeChannelIndex = modeChannelIndex
onModeChannelIndexSelected: controller.returnModeChannelIndex = index
onThresholdValueChanged: controller.returnModeThreshold = thresholdValue
Behavior on y { PropertyAnimation { easing.type: Easing.InOutQuad; duration: 1000 } }
......@@ -408,7 +408,7 @@ QGCView {
thresholdValue: controller.offboardModeThreshold
thresholdDragEnabled: true
onModeChannelIndexChanged: controller.offboardModeChannelIndex = modeChannelIndex
onModeChannelIndexSelected: controller.offboardModeChannelIndex = index
onThresholdValueChanged: controller.offboardModeThreshold = thresholdValue
Behavior on y { PropertyAnimation { easing.type: Easing.InOutQuad; duration: 1000 } }
......
......@@ -45,6 +45,8 @@ Rectangle {
height: column.height + (ScreenTools.defaultFontPixelWidth * 2)
color: _qgcPal.window
signal modeChannelIndexSelected(int index)
QGCPalette { id: _qgcPal; colorGroupEnabled: enabled }
Item {
......@@ -82,7 +84,7 @@ Rectangle {
currentIndex: modeChannelIndex
enabled: modeChannelEnabled
onActivated: modeChannelIndex = index
onActivated: modeChannelIndexSelected(index)
}
QGCLabel {
......
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