[partition] Only apply preCheckEncryption to the encrypt widget once

This commit is contained in:
Aaron Rainbolt 2024-10-02 11:17:34 -05:00
parent cc96e65787
commit fe124b0e1e
No known key found for this signature in database
GPG Key ID: A709160D73C79109
2 changed files with 5 additions and 2 deletions

View File

@ -1031,9 +1031,10 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
if ( m_enableEncryptionWidget ) if ( m_enableEncryptionWidget )
{ {
m_encryptWidget->show(); m_encryptWidget->show();
if ( m_config->preCheckEncryption() ) if ( m_config->preCheckEncryption() && ! m_preCheckActivated )
{ {
m_encryptWidget->setEncryptionCheckbox( true ); m_encryptWidget->setEncryptionCheckbox( true );
m_preCheckActivated = true;
} }
} }
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) ); m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );
@ -1090,9 +1091,10 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice )
if ( shouldShowEncryptWidget( choice ) ) if ( shouldShowEncryptWidget( choice ) )
{ {
m_encryptWidget->show(); m_encryptWidget->show();
if ( m_config->preCheckEncryption() ) if ( m_config->preCheckEncryption() && ! m_preCheckActivated )
{ {
m_encryptWidget->setEncryptionCheckbox( true ); m_encryptWidget->setEncryptionCheckbox( true );
m_preCheckActivated = true;
} }
} }
m_previewBeforeLabel->setText( tr( "Current:", "@label" ) ); m_previewBeforeLabel->setText( tr( "Current:", "@label" ) );

View File

@ -173,6 +173,7 @@ private:
QString m_osproberOneEntryName; QString m_osproberOneEntryName;
bool m_enableEncryptionWidget = false; bool m_enableEncryptionWidget = false;
bool m_preCheckActivated = false;
QMutex m_coreMutex; QMutex m_coreMutex;
}; };