Save settings on Launcher window close.
Patch by Slawek Mikula, from: https://sourceforge.net/p/flightgear/codetickets/2158/
This commit is contained in:
parent
ba36bd90e0
commit
f76709a853
2 changed files with 9 additions and 1 deletions
|
@ -128,6 +128,14 @@ LauncherMainWindow::~LauncherMainWindow()
|
|||
{
|
||||
}
|
||||
|
||||
bool LauncherMainWindow::event(QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::Close) {
|
||||
m_controller->saveSettings();
|
||||
}
|
||||
return QQuickView::event(event);
|
||||
}
|
||||
|
||||
bool LauncherMainWindow::execInApp()
|
||||
{
|
||||
m_controller->setInAppMode();
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
|
||||
bool wasRejected();
|
||||
|
||||
|
||||
bool event(QEvent *event) override;
|
||||
private:
|
||||
LauncherController* m_controller;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue