frontend-plugins: Fix auto scene switcher not saving settings on close

The `done` event does not emit a `closeEvent`, but saving is only
implemented in that event handler. Changing this to `close` correctly
triggers the default QWidget event and thus settings are saved.
This commit is contained in:
PatTheMav
2023-04-05 21:26:15 +00:00
committed by Rodney
parent e8541b9e27
commit 1bab65683e
2 changed files with 3 additions and 3 deletions
@@ -128,9 +128,10 @@ SceneSwitcher::SceneSwitcher(QWidget *parent)
SetStopped();
loading = false;
connect(this, &QDialog::finished, this, &SceneSwitcher::finished);
}
void SceneSwitcher::closeEvent(QCloseEvent *)
void SceneSwitcher::finished()
{
obs_frontend_save();
}
@@ -21,8 +21,6 @@ public:
SceneSwitcher(QWidget *parent);
void closeEvent(QCloseEvent *event) override;
void SetStarted();
void SetStopped();
@@ -41,6 +39,7 @@ public slots:
void on_noMatchSwitchScene_currentTextChanged(const QString &text);
void on_checkInterval_valueChanged(int value);
void on_toggleStartButton_clicked();
void finished();
};
void GetWindowList(std::vector<std::string> &windows);