From cc96e65787a12cd2e93b69646aaf6b89c7d0ed52 Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Wed, 25 Sep 2024 18:01:54 -0500 Subject: [PATCH 1/2] [partition] Always update EncryptWidget's m_state when updateState is called --- src/modules/partition/gui/EncryptWidget.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/modules/partition/gui/EncryptWidget.cpp b/src/modules/partition/gui/EncryptWidget.cpp index ea0f57b29..93fc852ba 100644 --- a/src/modules/partition/gui/EncryptWidget.cpp +++ b/src/modules/partition/gui/EncryptWidget.cpp @@ -184,13 +184,10 @@ EncryptWidget::updateState( const bool notify ) Encryption newState = state(); - if ( newState != m_state ) + m_state = newState; + if ( notify ) { - m_state = newState; - if ( notify ) - { - Q_EMIT stateChanged( m_state ); - } + Q_EMIT stateChanged( m_state ); } } From fe124b0e1e80e6e1ccbfa5b5d1679a5e169e1860 Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Wed, 2 Oct 2024 11:17:34 -0500 Subject: [PATCH 2/2] [partition] Only apply preCheckEncryption to the encrypt widget once --- src/modules/partition/gui/ChoicePage.cpp | 6 ++++-- src/modules/partition/gui/ChoicePage.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 99a50c017..96e7793c9 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -1031,9 +1031,10 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice ) if ( m_enableEncryptionWidget ) { m_encryptWidget->show(); - if ( m_config->preCheckEncryption() ) + if ( m_config->preCheckEncryption() && ! m_preCheckActivated ) { m_encryptWidget->setEncryptionCheckbox( true ); + m_preCheckActivated = true; } } m_previewBeforeLabel->setText( tr( "Current:", "@label" ) ); @@ -1090,9 +1091,10 @@ ChoicePage::updateActionChoicePreview( InstallChoice choice ) if ( shouldShowEncryptWidget( choice ) ) { m_encryptWidget->show(); - if ( m_config->preCheckEncryption() ) + if ( m_config->preCheckEncryption() && ! m_preCheckActivated ) { m_encryptWidget->setEncryptionCheckbox( true ); + m_preCheckActivated = true; } } m_previewBeforeLabel->setText( tr( "Current:", "@label" ) ); diff --git a/src/modules/partition/gui/ChoicePage.h b/src/modules/partition/gui/ChoicePage.h index 1917ef049..6a777e20d 100644 --- a/src/modules/partition/gui/ChoicePage.h +++ b/src/modules/partition/gui/ChoicePage.h @@ -173,6 +173,7 @@ private: QString m_osproberOneEntryName; bool m_enableEncryptionWidget = false; + bool m_preCheckActivated = false; QMutex m_coreMutex; };