I guess this is a better spot.

This commit is contained in:
Teo Mrnjavac 2016-01-15 18:20:40 +01:00
parent 7c7c635d87
commit 16da0bd8d8

View File

@ -677,21 +677,9 @@ ChoicePage::updateDeviceStatePreview()
switch ( m_choice )
{
case Replace:
m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::SingleSelection );
m_beforePartitionLabelsView->setSelectionMode( QAbstractItemView::SingleSelection );
break;
case Alongside:
m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::SingleSelection );
m_beforePartitionLabelsView->setSelectionMode( QAbstractItemView::SingleSelection );
{
SelectionFilter filter = [ this ]( const QModelIndex& index )
{
return PartUtils::canBeResized( m_core,
index.data( PartitionModel::PartitionPathRole ).toString() );
};
m_beforePartitionBarsView->setSelectionFilter( filter );
m_beforePartitionLabelsView->setSelectionFilter( filter );
}
break;
default:
m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::NoSelection );
@ -758,6 +746,14 @@ ChoicePage::updateActionChoicePreview( ChoicePage::Choice choice )
m_previewAfterFrame->show();
m_previewAfterLabel->show();
SelectionFilter filter = [ this ]( const QModelIndex& index )
{
return PartUtils::canBeResized( m_core,
index.data( PartitionModel::PartitionPathRole ).toString() );
};
m_beforePartitionBarsView->setSelectionFilter( filter );
m_beforePartitionLabelsView->setSelectionFilter( filter );
break;
}
case Erase: