1
0
Fork 0

Fix bug #1845, closing the Qt launcher

Intercept the close event and quit the app instead of continuing to
run the main FlightGear application.

https://sourceforge.net/p/flightgear/codetickets/1845/
This commit is contained in:
James Turner 2016-02-24 21:50:37 +02:00
parent 41b78ce150
commit 1aa6482a59
2 changed files with 9 additions and 0 deletions

View file

@ -725,6 +725,11 @@ void QtLauncher::setEnableDisableOptionFromCheckbox(QCheckBox* cbox, QString nam
}
}
void QtLauncher::closeEvent(QCloseEvent *event)
{
qApp->exit(-1);
}
void QtLauncher::onRun()
{
flightgear::Options* opt = flightgear::Options::sharedInstance();

View file

@ -53,6 +53,10 @@ public:
void setSceneryPaths();
protected:
virtual void closeEvent(QCloseEvent *event);
private slots:
// run is used when the launcher is invoked before the main app is
// started