diff --git a/lib/general.cpp b/lib/general.cpp index f25393af..024b9e6f 100644 --- a/lib/general.cpp +++ b/lib/general.cpp @@ -391,12 +391,16 @@ void AdvSceneSwitcher::CheckFirstTimeSetup() return; } - auto macro = FirstRunWizard::ShowWizard(this); + bool wasSkipped = false; + auto macro = FirstRunWizard::ShowWizard(this, &wasSkipped); if (macro) { renameMacroIfNecessary(macro); QTimer::singleShot(0, this, [this, macro]() { ui->macros->Add(macro); }); } + if (wasSkipped) { + ui->alwaysShowFeatureTabs->setChecked(true); + } switcher->Start(); } diff --git a/lib/utils/first-run-wizard.cpp b/lib/utils/first-run-wizard.cpp index c0be4ebe..30773d08 100644 --- a/lib/utils/first-run-wizard.cpp +++ b/lib/utils/first-run-wizard.cpp @@ -398,10 +398,14 @@ void FirstRunWizard::markFirstRunComplete() } // static -std::shared_ptr FirstRunWizard::ShowWizard(QWidget *parent) +std::shared_ptr FirstRunWizard::ShowWizard(QWidget *parent, + bool *wasSkipped) { auto wizard = new FirstRunWizard(parent); wizard->exec(); + if (wasSkipped) { + *wasSkipped = (wizard->result() == QDialog::Rejected); + } wizard->deleteLater(); return wizard->_macro; } diff --git a/lib/utils/first-run-wizard.hpp b/lib/utils/first-run-wizard.hpp index d39d9b7a..842d9b58 100644 --- a/lib/utils/first-run-wizard.hpp +++ b/lib/utils/first-run-wizard.hpp @@ -113,7 +113,8 @@ class FirstRunWizard : public QWizard { Q_OBJECT public: explicit FirstRunWizard(QWidget *parent = nullptr); - static std::shared_ptr ShowWizard(QWidget *parent); + static std::shared_ptr ShowWizard(QWidget *parent, + bool *wasSkipped = nullptr); static bool CreateMacro(std::shared_ptr ¯o, const std::string ¯oName, const std::string &conditionId, obs_data_t *conditionData,