[partition] Set up label checkbox later

If the update-fs-label checkbox and drop-down depend on the
state of the format button, then set that up only once we're
done deciding on the format button.
This commit is contained in:
Adriaan de Groot 2024-02-17 14:26:39 +01:00
parent a2b21ee087
commit ecd8839ac9

View File

@ -126,9 +126,6 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
m_ui->fileSystemComboBox->setCurrentText( FileSystem::nameForType( defaultFSType ) );
}
m_ui->fileSystemLabel->setEnabled( m_ui->formatRadioButton->isChecked() );
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
const bool partitionIsZFS = m_partition->fileSystem().type() == FileSystem::Type::Zfs;
if ( partitionIsZFS )
@ -143,6 +140,9 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
m_ui->keepRadioButton->setChecked( !partitionIsZFS );
m_ui->keepRadioButton->setEnabled( !partitionIsZFS );
m_ui->fileSystemLabel->setEnabled( m_ui->formatRadioButton->isChecked() );
m_ui->fileSystemComboBox->setEnabled( m_ui->formatRadioButton->isChecked() );
setFlagList( *( m_ui->m_listFlags ), m_partition->availableFlags(), PartitionInfo::flags( m_partition ) );
}