Commit a9a049ca authored by Lorenz Meier's avatar Lorenz Meier

Fix link status in QGC toolbar

parent 4c9ef473
...@@ -781,11 +781,17 @@ void QGCToolBar::connectLink(bool connect) ...@@ -781,11 +781,17 @@ void QGCToolBar::connectLink(bool connect)
link->setPortName(portComboBox->itemData(portComboBox->currentIndex()).toString().trimmed()); link->setPortName(portComboBox->itemData(portComboBox->currentIndex()).toString().trimmed());
int baud = baudcomboBox->currentText().toInt(); int baud = baudcomboBox->currentText().toInt();
link->setBaudRate(baud); link->setBaudRate(baud);
QObject::connect(link, SIGNAL(connected(bool)), this, SLOT(updateLinkState(bool)));
link->connect(); link->connect();
} }
} else if (!connect && currentLink) { } else if (!connect && currentLink) {
currentLink->disconnect(); currentLink->disconnect();
QObject::disconnect(currentLink, SIGNAL(connected(bool)), this, SLOT(updateLinkState(bool)));
}
if (currentLink) {
updateLinkState(currentLink->isConnected());
} }
} }
......
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