diff --git a/src/modules/partition/gui/EditExistingPartitionDialog.cpp b/src/modules/partition/gui/EditExistingPartitionDialog.cpp index a11aec48b..5aa1e21f6 100644 --- a/src/modules/partition/gui/EditExistingPartitionDialog.cpp +++ b/src/modules/partition/gui/EditExistingPartitionDialog.cpp @@ -62,8 +62,6 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partit mountPoints.sort(); m_ui->mountPointComboBox->addItems( mountPoints ); - m_usedMountPoints.removeOne( PartitionInfo::mountPoint( partition ) ); - QColor color = ColorUtils::colorForPartition( m_partition ); m_partitionSizeController->init( m_device, m_partition, color ); m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox ); diff --git a/src/modules/partition/gui/PartitionPage.cpp b/src/modules/partition/gui/PartitionPage.cpp index 6fa64fda8..5e3239050 100644 --- a/src/modules/partition/gui/PartitionPage.cpp +++ b/src/modules/partition/gui/PartitionPage.cpp @@ -266,7 +266,10 @@ PartitionPage::onPartitionViewActivated() void PartitionPage::updatePartitionToCreate( Device* device, Partition* partition ) { - QPointer dlg = new CreatePartitionDialog( device, partition->parent(), getCurrentUsedMountpoints(), this ); + QStringList mountPoints = getCurrentUsedMountpoints(); + mountPoints.removeOne( PartitionInfo::mountPoint( partition ) ); + + QPointer dlg = new CreatePartitionDialog( device, partition->parent(), mountPoints, this ); dlg->initFromPartitionToCreate( partition ); if ( dlg->exec() == QDialog::Accepted ) { @@ -280,7 +283,10 @@ PartitionPage::updatePartitionToCreate( Device* device, Partition* partition ) void PartitionPage::editExistingPartition( Device* device, Partition* partition ) { - QPointer dlg = new EditExistingPartitionDialog( device, partition, getCurrentUsedMountpoints(), this ); + QStringList mountPoints = getCurrentUsedMountpoints(); + mountPoints.removeOne( PartitionInfo::mountPoint( partition ) ); + + QPointer dlg = new EditExistingPartitionDialog( device, partition, mountPoints, this ); if ( dlg->exec() == QDialog::Accepted ) dlg->applyChanges( m_core ); delete dlg;