From ecd8839ac922ba965c99c4cb263ea3d12ebad36e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 17 Feb 2024 14:26:39 +0100 Subject: [PATCH] [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. --- src/modules/partition/gui/EditExistingPartitionDialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp index 9636799a9..4c02e2d0b 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp +++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp @@ -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 ) ); }