From 550dde314fe5292b38b471f137af5c10cacd3598 Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Thu, 14 Apr 2016 11:07:41 +0200 Subject: [PATCH] Launcher: do not launch the simulator when closing the Qt launcher with ESC --- src/GUI/QtLauncher.cxx | 7 ++++++- src/GUI/QtLauncher_private.hxx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index 870d092da..1cbcfb790 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -462,7 +462,7 @@ bool runLauncherDialog() // avoid double Apple menu and other weirdness if both Qt and OSG // try to initialise various Cocoa structures. flightgear::WindowBuilder::setPoseAsStandaloneApp(false); - + QtLauncher dlg; dlg.show(); @@ -773,6 +773,11 @@ void QtLauncher::closeEvent(QCloseEvent *event) qApp->exit(-1); } +void QtLauncher::reject() +{ + qApp->exit(-1); +} + void QtLauncher::onRun() { flightgear::Options* opt = flightgear::Options::sharedInstance(); diff --git a/src/GUI/QtLauncher_private.hxx b/src/GUI/QtLauncher_private.hxx index e53c7ba19..3d9495c1f 100644 --- a/src/GUI/QtLauncher_private.hxx +++ b/src/GUI/QtLauncher_private.hxx @@ -56,7 +56,7 @@ public: static void restartTheApp(QStringList fgArgs); protected: virtual void closeEvent(QCloseEvent *event); - + virtual void reject(); private slots: // run is used when the launcher is invoked before the main app is -- 2.39.5