From 39d8d143d6d30dd0e5ffc717ee6fe00c92b1d15d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 25 Jul 2018 11:45:20 +0200 Subject: [PATCH] Fixed KIDIALOG freeze wxDialog calls Show(false) when the dialog is about to be closed, but KIDIALOG::Show() implementation did not forward the show parameter to wxRichMessageDialog::Show() invocation. As the parameter was not specified, the mentioned Show() call always used 'true' as the default parameter, preventing the dialog from being closed. Fixes: lp:1782999 * https://bugs.launchpad.net/kicad/+bug/1782999 --- common/confirm.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/common/confirm.cpp b/common/confirm.cpp index 5f4ae460d5..2e15f3752a 100644 --- a/common/confirm.cpp +++ b/common/confirm.cpp @@ -72,13 +72,17 @@ void KIDIALOG::ForceShowAgain() bool KIDIALOG::Show( bool aShow ) { - // Check if this dialog should be shown to the user - auto it = doNotShowAgainDlgs.find( m_hash ); + // We should check the do-not-show-again setting only when the dialog is displayed + if( aShow ) + { + // Check if this dialog should be shown to the user + auto it = doNotShowAgainDlgs.find( m_hash ); - if( it != doNotShowAgainDlgs.end() ) - return it->second; + if( it != doNotShowAgainDlgs.end() ) + return it->second; + } - bool ret = wxRichMessageDialog::Show(); + bool ret = wxRichMessageDialog::Show( aShow ); // Has the user asked not to show the dialog again if( IsCheckBoxChecked() )