From 772ea8e0516402163dd8ce2d195a5e07a22b28f4 Mon Sep 17 00:00:00 2001 From: Fredrik Larson Date: Thu, 28 Aug 2014 05:58:14 +1000 Subject: [PATCH] Disable sliders by default, as default airframe is Aileron and on a clean board with no settings the mixer slider will be enabled. Use setCurrentText rather than relying on an index --- .../openpilotgcs/src/plugins/config/airframe_fixedwing.ui | 5 ++--- .../config/cfg_vehicletypes/configfixedwingwidget.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/airframe_fixedwing.ui b/ground/openpilotgcs/src/plugins/config/airframe_fixedwing.ui index 620f8a572..a20b1f20b 100644 --- a/ground/openpilotgcs/src/plugins/config/airframe_fixedwing.ui +++ b/ground/openpilotgcs/src/plugins/config/airframe_fixedwing.ui @@ -218,7 +218,7 @@ margin:1px; - true + false @@ -286,7 +286,7 @@ margin:1px; - true + false @@ -737,4 +737,3 @@ margin:1px; - diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp index 31bee79b6..3ba1df668 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configfixedwingwidget.cpp @@ -137,9 +137,9 @@ void ConfigFixedWingWidget::setupUI(QString frameType) m_aircraft->fwAileron1Label->setText("Elevon 1"); m_aircraft->fwAileron2Label->setText("Elevon 2"); m_aircraft->fwElevator1ChannelBox->setEnabled(false); - m_aircraft->fwElevator1ChannelBox->setCurrentIndex(0); + m_aircraft->fwElevator1ChannelBox->setCurrentText("None"); m_aircraft->fwElevator2ChannelBox->setEnabled(false); - m_aircraft->fwElevator2ChannelBox->setCurrentIndex(0); + m_aircraft->fwElevator2ChannelBox->setCurrentText("None"); m_aircraft->fwRudder1ChannelBox->setEnabled(true); m_aircraft->fwRudder2ChannelBox->setEnabled(true); @@ -154,9 +154,9 @@ void ConfigFixedWingWidget::setupUI(QString frameType) planeimg->setElementId("vtail"); setComboCurrentIndex(m_aircraft->fixedWingType, m_aircraft->fixedWingType->findText("Vtail")); m_aircraft->fwRudder1ChannelBox->setEnabled(false); - m_aircraft->fwRudder1ChannelBox->setCurrentIndex(0); + m_aircraft->fwRudder1ChannelBox->setCurrentText("None"); m_aircraft->fwRudder2ChannelBox->setEnabled(false); - m_aircraft->fwRudder2ChannelBox->setCurrentIndex(0); + m_aircraft->fwRudder2ChannelBox->setCurrentText("None"); m_aircraft->fwElevator1Label->setText("Vtail 1"); m_aircraft->fwElevator1ChannelBox->setEnabled(true);