mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 01:45:36 -04:00
Remove current partition's mountpoint from used list.
This means that when we edit a partition, we don't consider its current mountpoint invalid because it is already in-use. We need to do this for both "edit existing partition" and "edit a partition that we are still creating".
This commit is contained in:
parent
349470ae71
commit
2759529841
2 changed files with 8 additions and 4 deletions
|
@ -62,8 +62,6 @@ EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, Partit
|
||||||
mountPoints.sort();
|
mountPoints.sort();
|
||||||
m_ui->mountPointComboBox->addItems( mountPoints );
|
m_ui->mountPointComboBox->addItems( mountPoints );
|
||||||
|
|
||||||
m_usedMountPoints.removeOne( PartitionInfo::mountPoint( partition ) );
|
|
||||||
|
|
||||||
QColor color = ColorUtils::colorForPartition( m_partition );
|
QColor color = ColorUtils::colorForPartition( m_partition );
|
||||||
m_partitionSizeController->init( m_device, m_partition, color );
|
m_partitionSizeController->init( m_device, m_partition, color );
|
||||||
m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox );
|
m_partitionSizeController->setSpinBox( m_ui->sizeSpinBox );
|
||||||
|
|
|
@ -266,7 +266,10 @@ PartitionPage::onPartitionViewActivated()
|
||||||
void
|
void
|
||||||
PartitionPage::updatePartitionToCreate( Device* device, Partition* partition )
|
PartitionPage::updatePartitionToCreate( Device* device, Partition* partition )
|
||||||
{
|
{
|
||||||
QPointer<CreatePartitionDialog> dlg = new CreatePartitionDialog( device, partition->parent(), getCurrentUsedMountpoints(), this );
|
QStringList mountPoints = getCurrentUsedMountpoints();
|
||||||
|
mountPoints.removeOne( PartitionInfo::mountPoint( partition ) );
|
||||||
|
|
||||||
|
QPointer<CreatePartitionDialog> dlg = new CreatePartitionDialog( device, partition->parent(), mountPoints, this );
|
||||||
dlg->initFromPartitionToCreate( partition );
|
dlg->initFromPartitionToCreate( partition );
|
||||||
if ( dlg->exec() == QDialog::Accepted )
|
if ( dlg->exec() == QDialog::Accepted )
|
||||||
{
|
{
|
||||||
|
@ -280,7 +283,10 @@ PartitionPage::updatePartitionToCreate( Device* device, Partition* partition )
|
||||||
void
|
void
|
||||||
PartitionPage::editExistingPartition( Device* device, Partition* partition )
|
PartitionPage::editExistingPartition( Device* device, Partition* partition )
|
||||||
{
|
{
|
||||||
QPointer<EditExistingPartitionDialog> dlg = new EditExistingPartitionDialog( device, partition, getCurrentUsedMountpoints(), this );
|
QStringList mountPoints = getCurrentUsedMountpoints();
|
||||||
|
mountPoints.removeOne( PartitionInfo::mountPoint( partition ) );
|
||||||
|
|
||||||
|
QPointer<EditExistingPartitionDialog> dlg = new EditExistingPartitionDialog( device, partition, mountPoints, this );
|
||||||
if ( dlg->exec() == QDialog::Accepted )
|
if ( dlg->exec() == QDialog::Accepted )
|
||||||
dlg->applyChanges( m_core );
|
dlg->applyChanges( m_core );
|
||||||
delete dlg;
|
delete dlg;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue