Only allow a ViewStep to change next button status if it's active now.
This commit is contained in:
parent
0f173e988c
commit
14130ae9c0
@ -111,7 +111,15 @@ ViewManager::insertViewStep( int before, ViewStep* step)
|
||||
m_stack->insertWidget( before, step->widget() );
|
||||
|
||||
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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user