Browse Source

Fix link status in QGC toolbar

QGC4.4
Lorenz Meier 11 years ago
parent
commit
a9a049ca2a
  1. 6
      src/ui/QGCToolBar.cc

6
src/ui/QGCToolBar.cc

@ -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());
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());
}
}

Loading…
Cancel
Save