From: Alessandro Menti Date: Thu, 14 Apr 2016 09:07:41 +0000 (+0200) Subject: Launcher: do not launch the simulator when closing the Qt launcher with ESC X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=550dde314fe5292b38b471f137af5c10cacd3598;p=flightgear.git Launcher: do not launch the simulator when closing the Qt launcher with ESC --- 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