From d567d882161a1b64b2108a58052dc9fb1f3f3e5c Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Sun, 1 Feb 2015 23:19:04 +0100 Subject: [PATCH] OP-1698 Changes from review --- .../config/cfg_vehicletypes/configmultirotorwidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp index 62a59a62a..6681a5b17 100644 --- a/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/cfg_vehicletypes/configmultirotorwidget.cpp @@ -1188,7 +1188,7 @@ bool ConfigMultiRotorWidget::throwConfigError(int numMotors) // Iterate through all instances of multiMotorChannelBox for (int i = 0; i < numMotors; i++) { - // Fine widgets with text "multiMotorChannelBox.x", where x is an integer + // Find widgets with his name "multiMotorChannelBox.x", where x is an integer QComboBox *combobox = this->findChild("multiMotorChannelBox" + QString::number(i + 1)); if (combobox) { if (combobox->currentText() == "None") { @@ -1209,13 +1209,13 @@ bool ConfigMultiRotorWidget::throwConfigError(int numMotors) combobox->setToolTip(""); } } - channelNames += combobox->currentText() == "None" ? "" : combobox->currentText(); + channelNames += (combobox->currentText() == "None") ? "" : combobox->currentText(); } } // Iterate through all instances of rcOutputChannelBox for (int i = 0; i < 3; i++) { - // Fine widgets with text "rcOutputChannelBox.x", where x is an integer + // Find widgets with his name "rcOutputChannelBox.x", where x is an integer QComboBox *combobox = this->findChild("rcOutputChannelBox" + QString::number(i + 1)); if (combobox) { if (channelNames.contains(combobox->currentText(), Qt::CaseInsensitive)) { @@ -1230,7 +1230,7 @@ bool ConfigMultiRotorWidget::throwConfigError(int numMotors) combobox->setToolTip(tr("Select output channel for Accessory%1 RcInput").arg(i)); } } - channelNames += combobox->currentText() == "None" ? "" : combobox->currentText(); + channelNames += (combobox->currentText() == "None") ? "" : combobox->currentText(); } }