mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
Allow changing the to be resized partition without a reinit.
This commit is contained in:
parent
4537103a43
commit
430a4feea9
1 changed files with 32 additions and 1 deletions
|
@ -111,7 +111,38 @@ PartitionSplitterWidget::setSplitPartition( const QString& path,
|
|||
|
||||
if ( m_itemToResize || m_itemToResizeNext || !m_itemToResizePath.isEmpty() )
|
||||
{
|
||||
cDebug() << "ERROR: trying to split partition but partition to split is already set.";
|
||||
cDebug() << "NOTICE: trying to split partition but partition to split is already set.";
|
||||
|
||||
// We need to remove the itemToResizeNext from wherever it is
|
||||
for ( int i = 0; i < m_items.count(); ++i )
|
||||
{
|
||||
if ( m_items[ i ].itemPath == m_itemToResize->itemPath &&
|
||||
i + 1 < m_items.count() )
|
||||
{
|
||||
m_items.removeAt( i + 1 );
|
||||
m_itemToResizeNext = nullptr;
|
||||
break;
|
||||
}
|
||||
else if ( !m_items[ i ].children.isEmpty() )
|
||||
{
|
||||
for ( int j = 0; j < m_items[ i ].children.count(); ++j )
|
||||
{
|
||||
if ( m_items[ i ].children[ j ].itemPath == m_itemToResize->itemPath &&
|
||||
j + 1 < m_items[ i ].children.count() )
|
||||
{
|
||||
m_items[ i ].children.removeAt( j + 1 );
|
||||
m_itemToResizeNext = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( !m_itemToResizeNext )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_itemToResize = nullptr;
|
||||
m_itemToResizePath.clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue