diff --git a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp index 73e18ba1c..c5a72f0b6 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.cpp @@ -35,7 +35,7 @@ #include -ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(parent) +ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(parent), m_refreshing(true) { m_ui = new Ui_RevoHWWidget(); m_ui->setupUi(this); @@ -76,6 +76,7 @@ ConfigRevoHWWidget::ConfigRevoHWWidget(QWidget *parent) : ConfigTaskWidget(paren populateWidgets(); refreshWidgetsValues(); forceConnectedState(); + m_refreshing = false; } ConfigRevoHWWidget::~ConfigRevoHWWidget() @@ -99,12 +100,14 @@ void ConfigRevoHWWidget::setupCustomCombos() void ConfigRevoHWWidget::refreshWidgetsValues(UAVObject *obj) { + m_refreshing = true; ConfigTaskWidget::refreshWidgetsValues(obj); usbVCPPortChanged(0); mainPortChanged(0); flexiPortChanged(0); modemPortChanged(0); + m_refreshing = false; } void ConfigRevoHWWidget::updateObjectsFromWidgets() @@ -292,7 +295,9 @@ void ConfigRevoHWWidget::modemPortChanged(int index) m_ui->cbTxPower->setVisible(true); m_ui->lblInitFreq->setVisible(true); m_ui->leInitFreq->setVisible(true); - QMessageBox::warning(this, tr("Warning"), tr("Activating the Radio requires an antenna be attached or modem damage will occur.")); + if(!m_refreshing) { + QMessageBox::warning(this, tr("Warning"), tr("Activating the Radio requires an antenna be attached or modem damage will occur.")); + } } else { m_ui->lblTxPower->setVisible(false); m_ui->cbTxPower->setVisible(false); diff --git a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h index bfabea5b4..d7eb30b66 100644 --- a/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h +++ b/ground/openpilotgcs/src/plugins/config/configrevohwwidget.h @@ -44,6 +44,7 @@ public: ~ConfigRevoHWWidget(); private: + bool m_refreshing; Ui_RevoHWWidget *m_ui; void setupCustomCombos();