From 7c7c635d8778abf415a465aad355e111ef81ebb2 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 15 Jan 2016 18:06:16 +0100 Subject: [PATCH] Set filter on both views. --- src/modules/partition/gui/ChoicePage.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 6c7b9f06b..f314ebf14 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -683,11 +683,15 @@ ChoicePage::updateDeviceStatePreview() 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() ); - }); + 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 );