mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-26 09:21:55 -04:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user