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)
link->setPortName(portComboBox->itemData(portComboBox->currentIndex()).toString().trimmed());
int baud = baudcomboBox->currentText().toInt();
link->setBaudRate(baud);
QObject::connect(link, SIGNAL(connected(bool)), this, SLOT(updateLinkState(bool)));
link->connect();
}
} else if (!connect && currentLink) {
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