From 0b0323c0cb77f00883d9a030e18be4607f5518d3 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 3 Dec 2014 10:32:50 -0800 Subject: [PATCH] Disconnect all links on MainWindow close Previously link were just destroyed --- src/ui/MainWindow.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index d10685839..8ed2ee971 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -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); } } -- 2.22.0