[partition] Check-which-page consistently

This commit is contained in:
Adriaan de Groot 2019-04-02 05:30:22 -04:00
parent 8f9b9a2ccf
commit 71fd3ab010

View File

@ -311,10 +311,10 @@ PartitionViewStep::back()
bool bool
PartitionViewStep::isNextEnabled() const PartitionViewStep::isNextEnabled() const
{ {
if ( m_choicePage && m_choicePage == m_widget->currentWidget() ) if ( m_choicePage && m_widget->currentWidget() == m_choicePage )
return m_choicePage->isNextEnabled(); return m_choicePage->isNextEnabled();
if ( m_manualPartitionPage && m_manualPartitionPage == m_widget->currentWidget() ) if ( m_manualPartitionPage && m_widget->currentWidget() == m_manualPartitionPage )
return m_core->hasRootMountPoint(); return m_core->hasRootMountPoint();
return false; return false;
@ -331,7 +331,7 @@ PartitionViewStep::isBackEnabled() const
bool bool
PartitionViewStep::isAtBeginning() const PartitionViewStep::isAtBeginning() const
{ {
if ( m_widget->currentWidget() == m_manualPartitionPage ) if ( m_widget->currentWidget() != m_choicePage )
return false; return false;
return true; return true;
} }
@ -340,7 +340,7 @@ PartitionViewStep::isAtBeginning() const
bool bool
PartitionViewStep::isAtEnd() const PartitionViewStep::isAtEnd() const
{ {
if ( m_choicePage == m_widget->currentWidget() ) if ( m_widget->currentWidget() == m_choicePage )
{ {
if ( m_choicePage->currentChoice() == ChoicePage::Erase || if ( m_choicePage->currentChoice() == ChoicePage::Erase ||
m_choicePage->currentChoice() == ChoicePage::Replace || m_choicePage->currentChoice() == ChoicePage::Replace ||