diff options
Diffstat (limited to 'ui/qt5/pkgsimple.cc')
-rw-r--r-- | ui/qt5/pkgsimple.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ui/qt5/pkgsimple.cc b/ui/qt5/pkgsimple.cc index 9ae9495..ecb192a 100644 --- a/ui/qt5/pkgsimple.cc +++ b/ui/qt5/pkgsimple.cc @@ -11,6 +11,7 @@ */ #include "pkgsimple.hh" +#include "pkgdefaults.hh" #include <QButtonGroup> #include <QGridLayout> @@ -104,3 +105,26 @@ int PkgSimplePage::nextId() const { return HorizonWizard::Page_Boot; } + +bool PkgSimplePage::validatePage() { + /* This code handles the following scenario: + * + * - 'Custom' is selected + * - A non-default option is selected on the Defaults page (i.e., mdevd) + * - Back is chosen + * - A non-custom package selection choice is selected + * + * We need to completely 'reset' the state of the Defaults, including + * the selections on the Defaults page, whenever Next is chosen. + */ + if(horizonWizard()->pkgtype == HorizonWizard::Custom) { + horizonWizard()->removePage(HorizonWizard::Page_PkgCustomDefault); + horizonWizard()->setPage(HorizonWizard::Page_PkgCustomDefault, new PkgDefaultsPage); + } else { + horizonWizard()->sbininit = HorizonWizard::S6; + horizonWizard()->binsh = HorizonWizard::Dash; + horizonWizard()->eudev = true; + } + + return true; +} |