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:
parent
41b78ce150
commit
1aa6482a59
2 changed files with 9 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue