Skip to content

Commit

Permalink
Latch page required logic at startup to ensure appropriate pages display
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulat committed Nov 30, 2024
1 parent e8612af commit e6edda8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scwx-qt/source/scwx/qt/ui/setup/setup_wizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class SetupWizard::Impl
public:
explicit Impl() = default;
~Impl() = default;

bool mapProviderPageIsRequired_ {MapProviderPage::IsRequired()};
bool audioCodecPageIsRequired_ {AudioCodecPage::IsRequired()};
};

SetupWizard::SetupWizard(QWidget* parent) :
Expand Down Expand Up @@ -66,14 +69,14 @@ int SetupWizard::nextId() const
{
case static_cast<int>(Page::MapProvider):
case static_cast<int>(Page::MapLayout):
if (MapProviderPage::IsRequired())
if (p->mapProviderPageIsRequired_)
{
return nextId;
}
break;

case static_cast<int>(Page::AudioCodec):
if (AudioCodecPage::IsRequired())
if (p->audioCodecPageIsRequired_)
{
return nextId;
}
Expand Down

0 comments on commit e6edda8

Please sign in to comment.