From 0df304b206d71ed3f8d3e3c170ccd39dfccb1165 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 16 May 2018 07:19:34 -0400 Subject: [PATCH] [partition] Preserve desired partition flags - Use the desired (future) flags, if set, to initialize the flags checkboxes. If there are no future flags set, this returns active flags as before. - This fixes the situation where editing a partition, changing flags, then editing it *again* re-starts with the original flags instead of the modified flags. --- src/modules/partition/gui/EditExistingPartitionDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp index 29dad951c..6ce23cdfd 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp +++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp @@ -141,7 +141,7 @@ EditExistingPartitionDialog::setupFlagsList() m_ui->m_listFlags->addItem( item ); item->setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsEnabled ); item->setData( Qt::UserRole, f ); - item->setCheckState( ( m_partition->activeFlags() & f ) ? + item->setCheckState( ( PartitionInfo::flags( m_partition ) & f ) ? Qt::Checked : Qt::Unchecked ); }