Set filter on both views.

main
Teo Mrnjavac 9 years ago
parent ba01022d42
commit 7c7c635d87

@ -683,11 +683,15 @@ ChoicePage::updateDeviceStatePreview()
case Alongside: case Alongside:
m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::SingleSelection ); m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::SingleSelection );
m_beforePartitionLabelsView->setSelectionMode( QAbstractItemView::SingleSelection ); m_beforePartitionLabelsView->setSelectionMode( QAbstractItemView::SingleSelection );
m_beforePartitionBarsView->setSelectionFilter( [ this ]( const QModelIndex& index )
{ {
return PartUtils::canBeResized( m_core, SelectionFilter filter = [ this ]( const QModelIndex& index )
index.data( PartitionModel::PartitionPathRole ).toString() ); {
}); return PartUtils::canBeResized( m_core,
index.data( PartitionModel::PartitionPathRole ).toString() );
};
m_beforePartitionBarsView->setSelectionFilter( filter );
m_beforePartitionLabelsView->setSelectionFilter( filter );
}
break; break;
default: default:
m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::NoSelection ); m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::NoSelection );

Loading…
Cancel
Save