Rebuild autopartition proposal when encryption choice changes.

main
Teo Mrnjavac 9 years ago
parent b6c2e0f4d7
commit b792ea0216

@ -159,7 +159,7 @@ ChoicePage::init( PartitionCoreModule* core )
this, &ChoicePage::applyDeviceChoice );
connect( m_encryptWidget, &EncryptWidget::stateChanged,
this, &ChoicePage::updateNextEnabled );
this, &ChoicePage::onEncryptWidgetStateChanged );
ChoicePage::applyDeviceChoice();
}
@ -368,14 +368,14 @@ ChoicePage::applyActionChoice( ChoicePage::Choice choice )
} ),
[ = ]
{
PartitionActions::doAutopartition( m_core, selectedDevice() );
PartitionActions::doAutopartition( m_core, selectedDevice(), m_encryptWidget->passphrase() );
emit deviceChosen();
},
this );
}
else
{
PartitionActions::doAutopartition( m_core, selectedDevice() );
PartitionActions::doAutopartition( m_core, selectedDevice(), m_encryptWidget->passphrase() );
emit deviceChosen();
}
@ -474,6 +474,20 @@ ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current,
}
void
ChoicePage::onEncryptWidgetStateChanged()
{
EncryptWidget::State state = m_encryptWidget->state();
if ( m_choice == Erase )
{
if ( state == EncryptWidget::EncryptionConfirmed ||
state == EncryptWidget::EncryptionDisabled )
applyActionChoice( m_choice );
}
updateNextEnabled();
}
void
ChoicePage::onLeave()
{

@ -74,6 +74,7 @@ signals:
private slots:
void doReplaceSelectedPartition( const QModelIndex& current, const QModelIndex& previous );
void doAlongsideSetupSplitter( const QModelIndex& current, const QModelIndex& previous );
void onEncryptWidgetStateChanged();
private:
void updateNextEnabled();

Loading…
Cancel
Save