1
0
Fork 0

Launcher: do not launch the simulator when closing the Qt launcher with ESC

This commit is contained in:
Alessandro Menti 2016-04-14 11:07:41 +02:00 committed by James Turner
parent 4820026907
commit 550dde314f
2 changed files with 7 additions and 2 deletions

View 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();

View 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