Rely on item selection.

This commit is contained in:
Teo Mrnjavac 2015-12-31 16:24:46 +01:00
parent 59ec549617
commit 736d35840d

View File

@ -451,7 +451,7 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
[]{},
this );
}
setNextEnabled( m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() );
setNextEnabled( !m_beforePartitionBarsView->selectionModel()->selection().isEmpty() );
connect( m_beforePartitionBarsView->selectionModel(), SIGNAL( currentRowChanged( QModelIndex, QModelIndex ) ),
this, SLOT( doReplaceSelectedPartition( QModelIndex, QModelIndex ) ),
@ -492,7 +492,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current,
} ),
[]
{
setNextEnabled( m_beforePartitionBarsView->selectionModel()->currentIndex().isValid() );
setNextEnabled( !m_beforePartitionBarsView->selectionModel()->selection().isEmpty() );
}, this );
}