From f914163064a598e2d6a904e289780b52747954c6 Mon Sep 17 00:00:00 2001 From: Stefan Dunca Date: Tue, 21 May 2019 19:32:21 +0200 Subject: [PATCH] Windows UX improvement: improve the windows 1.5s closing workaround --- src/ui/MainRootWindow.qml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/MainRootWindow.qml b/src/ui/MainRootWindow.qml index 747a38bcb..719dfe076 100644 --- a/src/ui/MainRootWindow.qml +++ b/src/ui/MainRootWindow.qml @@ -192,6 +192,9 @@ ApplicationWindow { } function finishCloseProcess() { + if(ScreenTools.isWindows) { + hide() + } QGroundControl.linkManager.shutdown() // The above shutdown causes a flurry of activity as the vehicle components are removed. This in turn // causes the Windows Version of Qt to crash if you allow the close event to be accepted. In order to prevent @@ -210,6 +213,10 @@ ApplicationWindow { repeat: false onTriggered: { reallyClose() + if(ScreenTools.isWindows) { + // Closing the app while main is hidden doesn't work + Qt.callLater(Qt.quit) + } } } -- 2.22.0