Commit 0b0323c0 authored by Don Gagne's avatar Don Gagne

Disconnect all links on MainWindow close

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