[partition] Set intent while creating FS-labeling job
This commit is contained in:
parent
23d203b00b
commit
3881737bbd
@ -557,15 +557,17 @@ PartitionCoreModule::formatPartition( Device* device, Partition* partition )
|
||||
void
|
||||
PartitionCoreModule::setFilesystemLabel( Device* device, Partition* partition, const QString& newLabel )
|
||||
{
|
||||
if ( newLabel.isEmpty() )
|
||||
if ( newLabel == PartitionInfo::label( partition ) )
|
||||
{
|
||||
// Don't bother
|
||||
return;
|
||||
}
|
||||
|
||||
auto deviceInfo = infoForDevice( device );
|
||||
Q_ASSERT( deviceInfo );
|
||||
|
||||
OperationHelper helper( partitionModelForDevice( device ), this );
|
||||
PartitionInfo::setLabel( partition, newLabel );
|
||||
deviceInfo->takeJob< ChangeFilesystemLabelJob >( partition );
|
||||
deviceInfo->makeJob< ChangeFilesystemLabelJob >( partition, newLabel );
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,6 @@ updateLabel( PartitionCoreModule* core, Device* device, Partition* partition, co
|
||||
if ( partition->fileSystem().type() != FileSystem::Type::Unformatted && fsLabel != partition->fileSystem().label() )
|
||||
{
|
||||
core->setFilesystemLabel( device, partition, fsLabel );
|
||||
PartitionInfo::setLabel(partition, fsLabel);
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,7 +83,7 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
|
||||
|
||||
// The filesystem label field is always enabled, because we may want to change
|
||||
// the label on the current filesystem without formatting.
|
||||
m_ui->fileSystemLabelEdit->setText( PartitionInfo::label(m_partition));
|
||||
m_ui->fileSystemLabelEdit->setText( PartitionInfo::label( m_partition ) );
|
||||
m_ui->fileSystemLabel->setEnabled( true );
|
||||
|
||||
replacePartResizerWidget();
|
||||
|
Loading…
Reference in New Issue
Block a user