Try to ensure the connection for the replace operation is unique.
This commit is contained in:
parent
d6e773e220
commit
64655d92a1
@ -437,14 +437,8 @@ 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, &ChoicePage::doReplaceSelectedPartition,
|
||||||
{
|
Qt::UniqueConnection );
|
||||||
cDebug() << "selectionModel reaction, sender is" << sender() << sender()->metaObject()->className();
|
|
||||||
ScanningDialog::run( QtConcurrent::run( this,
|
|
||||||
&ChoicePage::doReplaceSelectedPartition,
|
|
||||||
current ),
|
|
||||||
this );
|
|
||||||
}, Qt::UniqueConnection );
|
|
||||||
break;
|
break;
|
||||||
case NoChoice:
|
case NoChoice:
|
||||||
case Manual:
|
case Manual:
|
||||||
@ -455,9 +449,12 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
ChoicePage::doReplaceSelectedPartition( const QModelIndex& current,
|
||||||
|
const QModelIndex& previous )
|
||||||
{
|
{
|
||||||
cDebug() << "begin doReplace";
|
cDebug() << "selectionModel reaction, sender is" << sender();
|
||||||
|
ScanningDialog::run( QtConcurrent::run( [ = ]
|
||||||
|
{
|
||||||
QMutexLocker locker( &m_coreMutex );
|
QMutexLocker locker( &m_coreMutex );
|
||||||
|
|
||||||
if ( m_core->isDirty() )
|
if ( m_core->isDirty() )
|
||||||
@ -473,7 +470,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
|
|||||||
PartitionActions::doReplacePartition( m_core,
|
PartitionActions::doReplacePartition( m_core,
|
||||||
selectedDevice(),
|
selectedDevice(),
|
||||||
partition );
|
partition );
|
||||||
cDebug() << "end doReplace";
|
} ), this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ private:
|
|||||||
ExpandableRadioButton* createEraseButton();
|
ExpandableRadioButton* createEraseButton();
|
||||||
Device* selectedDevice();
|
Device* selectedDevice();
|
||||||
void applyDeviceChoice();
|
void applyDeviceChoice();
|
||||||
void doReplaceSelectedPartition( const QModelIndex& current );
|
void doReplaceSelectedPartition( const QModelIndex& current, const QModelIndex& previous );
|
||||||
void updateDeviceStatePreview();
|
void updateDeviceStatePreview();
|
||||||
void applyActionChoice( ChoicePage::Choice choice );
|
void applyActionChoice( ChoicePage::Choice choice );
|
||||||
void updateActionChoicePreview( ChoicePage::Choice choice );
|
void updateActionChoicePreview( ChoicePage::Choice choice );
|
||||||
|
Loading…
Reference in New Issue
Block a user