Commit 654fe43b authored by Don Gagne's avatar Don Gagne

Disconnect all links on MainWindow close

Previously link were just destroyed
parent b1cb2de2
......@@ -782,6 +782,8 @@ void MainWindow::closeEvent(QCloseEvent *event)
storeSettings();
mavlink->storeSettings();
UASManager::instance()->storeSettings();
// FIXME: If connected links, should prompt before close
LinkManager::instance()->disconnectAll();
event->accept();
}
......@@ -1039,7 +1041,7 @@ void MainWindow::enableAutoReconnect(bool enabled)
bool MainWindow::loadStyle(QGC_MAINWINDOW_STYLE style)
{
qDebug() << "LOAD STYLE" << style;
//qDebug() << "LOAD STYLE" << style;
bool success = true;
QString styles;
......@@ -1587,7 +1589,7 @@ void MainWindow::loadViewState()
{
if (widgetname != "")
{
qDebug() << "Loading widget:" << widgetname;
//qDebug() << "Loading widget:" << widgetname;
loadDockWidget(widgetname);
}
}
......
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