mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
Add a SelectionFilter lambda for Alongside.
This commit is contained in:
parent
ddf4878ec7
commit
65230c7954
1 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include "core/DeviceModel.h"
|
||||
#include "core/PartitionModel.h"
|
||||
#include "core/OsproberEntry.h"
|
||||
#include "core/PartUtils.h"
|
||||
|
||||
#include "ReplaceWidget.h"
|
||||
#include "PrettyRadioButton.h"
|
||||
|
@ -676,9 +677,17 @@ 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 );
|
||||
m_beforePartitionBarsView->setSelectionFilter( [ this ]( const QModelIndex& index )
|
||||
{
|
||||
return PartUtils::canBeResized( m_core,
|
||||
index.data( PartitionModel::PartitionPathRole ).toString() );
|
||||
});
|
||||
break;
|
||||
default:
|
||||
m_beforePartitionBarsView->setSelectionMode( QAbstractItemView::NoSelection );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue