diff --git a/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp b/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp index d8f3985c9..f5e56078a 100644 --- a/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp +++ b/UI/frontend-plugins/frontend-tools/auto-scene-switcher.cpp @@ -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(); } diff --git a/UI/frontend-plugins/frontend-tools/auto-scene-switcher.hpp b/UI/frontend-plugins/frontend-tools/auto-scene-switcher.hpp index 4ab611783..74dc3af99 100644 --- a/UI/frontend-plugins/frontend-tools/auto-scene-switcher.hpp +++ b/UI/frontend-plugins/frontend-tools/auto-scene-switcher.hpp @@ -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 &windows);