diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp index 55303d06d..9636799a9 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp +++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp @@ -130,10 +130,18 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, m_ui->fileSystemComboBox->setEnabled( m_ui->formatRadioButton->isChecked() ); // Force a format if the existing device is a zfs device since reusing a zpool isn't currently supported - m_ui->formatRadioButton->setChecked( m_partition->fileSystem().type() == FileSystem::Type::Zfs ); - m_ui->formatRadioButton->setEnabled( !( m_partition->fileSystem().type() == FileSystem::Type::Zfs ) ); - m_ui->keepRadioButton->setChecked( !( m_partition->fileSystem().type() == FileSystem::Type::Zfs ) ); - m_ui->keepRadioButton->setEnabled( !( m_partition->fileSystem().type() == FileSystem::Type::Zfs ) ); + const bool partitionIsZFS = m_partition->fileSystem().type() == FileSystem::Type::Zfs; + if ( partitionIsZFS ) + { + m_ui->formatRadioButton->setChecked( true ); + } + else + { + m_ui->formatRadioButton->setChecked( false ); + } + m_ui->formatRadioButton->setEnabled( !partitionIsZFS ); + m_ui->keepRadioButton->setChecked( !partitionIsZFS ); + m_ui->keepRadioButton->setEnabled( !partitionIsZFS ); setFlagList( *( m_ui->m_listFlags ), m_partition->availableFlags(), PartitionInfo::flags( m_partition ) ); }