]> git.mxchange.org Git - flightgear.git/commitdiff
Launcher: do not launch the simulator when closing the Qt launcher with ESC
authorAlessandro Menti <alessandro.menti@hotmail.it>
Thu, 14 Apr 2016 09:07:41 +0000 (11:07 +0200)
committerJames Turner <zakalawe@mac.com>
Sun, 17 Apr 2016 16:54:41 +0000 (17:54 +0100)
src/GUI/QtLauncher.cxx
src/GUI/QtLauncher_private.hxx

index 870d092da00cc52c9319f889e03eab34450b5cba..1cbcfb790c3d0b61c540c1501d34bc823d58ddaf 100644 (file)
@@ -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();
index e53c7ba19d96f0d789c535c44929202042642431..3d9495c1fba991363fde45bdd56ac04508450077 100644 (file)
@@ -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