mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 18:35:37 -04:00
Try with a full revert.
This commit is contained in:
parent
157a3f8ed2
commit
dcd48badae
1 changed files with 3 additions and 5 deletions
|
@ -453,23 +453,21 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
||||||
connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
connect( m_beforePartitionBarsView->selectionModel(), &QItemSelectionModel::currentRowChanged,
|
||||||
this, [ this ]( const QModelIndex& current, const QModelIndex& previous )
|
this, [ this ]( const QModelIndex& current, const QModelIndex& previous )
|
||||||
{
|
{
|
||||||
cDebug() << Q_FUNC_INFO;
|
|
||||||
cDebug() << "lambda in applyActionChoice for Replace, on selection changed.";
|
|
||||||
if ( m_core->isDirty() )
|
if ( m_core->isDirty() )
|
||||||
|
{
|
||||||
|
m_core->revertDevice( selectedDevice() );
|
||||||
m_core->clearJobs();
|
m_core->clearJobs();
|
||||||
|
}
|
||||||
|
|
||||||
// We can't use the PartitionPtrRole because we need to make changes to the
|
// We can't use the PartitionPtrRole because we need to make changes to the
|
||||||
// main DeviceModel, not the immutable copy.
|
// main DeviceModel, not the immutable copy.
|
||||||
QString partPath = current.data( PartitionModel::PartitionPathRole ).toString();
|
QString partPath = current.data( PartitionModel::PartitionPathRole ).toString();
|
||||||
Partition* partition = KPMHelpers::findPartitionByPath( { selectedDevice() },
|
Partition* partition = KPMHelpers::findPartitionByPath( { selectedDevice() },
|
||||||
partPath );
|
partPath );
|
||||||
cDebug() << "partPath is" << partPath;
|
|
||||||
if ( partition )
|
if ( partition )
|
||||||
PartitionActions::doReplacePartition( m_core,
|
PartitionActions::doReplacePartition( m_core,
|
||||||
selectedDevice(),
|
selectedDevice(),
|
||||||
partition );
|
partition );
|
||||||
else
|
|
||||||
cDebug() << "Partition is nullptr!";
|
|
||||||
} );
|
} );
|
||||||
break;
|
break;
|
||||||
case NoChoice:
|
case NoChoice:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue