mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04:00
Only allow a ViewStep to change next button status if it's active now.
This commit is contained in:
parent
0f173e988c
commit
14130ae9c0
1 changed files with 9 additions and 1 deletions
|
@ -111,7 +111,15 @@ ViewManager::insertViewStep( int before, ViewStep* step)
|
||||||
m_stack->insertWidget( before, step->widget() );
|
m_stack->insertWidget( before, step->widget() );
|
||||||
|
|
||||||
connect( step, &ViewStep::nextStatusChanged,
|
connect( step, &ViewStep::nextStatusChanged,
|
||||||
m_next, &QPushButton::setEnabled );
|
this, [this]( bool status )
|
||||||
|
{
|
||||||
|
ViewStep* vs = qobject_cast< ViewStep* >( sender() );
|
||||||
|
if ( vs )
|
||||||
|
{
|
||||||
|
if ( vs == m_steps.at( m_currentStep ) )
|
||||||
|
m_next->setEnabled( status );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
m_stack->setCurrentIndex( 0 );
|
m_stack->setCurrentIndex( 0 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue