From 96785bdb395337598b19870c57049567352c8bf4 Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Sat, 6 Jan 2024 18:02:43 +0100 Subject: [PATCH] 1.12.7 --- CHANGELOG.md | 1 + SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp | 9 +++++++-- SandboxiePlus/SandMan/Wizards/NewBoxWizard.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9748a434..e959035b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Make Duplicate Box Config keep the order of the original box configuration [#3523](https://github.com/sandboxie-plus/Sandboxie/issues/3523) +- Save options as new defaults disappears from the Summary page [#3522](https://github.com/sandboxie-plus/Sandboxie/issues/3522) diff --git a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp index 68c33703..a81f5824 100644 --- a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp +++ b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.cpp @@ -21,7 +21,7 @@ CNewBoxWizard::CNewBoxWizard(bool bAlowTemp, QWidget *parent) setPage(Page_Advanced, new CAdvancedPage); setPage(Page_Summary, new CSummaryPage); - m_bAdvanced = false; + m_bAdvanced = theConf->GetBool("Options/AdvancedBoxWizard", false); setWizardStyle(ModernStyle); //setOption(HaveHelpButton, true); @@ -377,13 +377,18 @@ CBoxTypePage::CBoxTypePage(bool bAlowTemp, QWidget *parent) palette.setColor(QPalette::Text, Qt::black); m_pAdvanced->setPalette(palette); } - m_pAdvanced->setChecked(theConf->GetBool("Options/AdvancedBoxWizard", false)); layout->addWidget(m_pAdvanced, row++, 2, 1, 1); connect(m_pAdvanced, SIGNAL(toggled(bool)), this, SLOT(OnAdvanced())); setLayout(layout); } + +void CBoxTypePage::initializePage() +{ + m_pAdvanced->setChecked(((CNewBoxWizard*)wizard())->m_bAdvanced); +} + void CBoxTypePage::setCurrentType(int type) { if(m_TypeGroup->buttons().count() < type) diff --git a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.h b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.h index 150411ec..c2f5431f 100644 --- a/SandboxiePlus/SandMan/Wizards/NewBoxWizard.h +++ b/SandboxiePlus/SandMan/Wizards/NewBoxWizard.h @@ -53,6 +53,8 @@ class CBoxTypePage : public QWizardPage public: CBoxTypePage(bool bAlowTemp, QWidget *parent = nullptr); + void initializePage() override; + int nextId() const override; bool isComplete() const override; bool validatePage() override;