From 4be95bef8c96a20b0cfe04616b37867d3c8e6e50 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 14 Sep 2010 10:24:35 +0000 Subject: [PATCH] Fix hang on termination of wxProgressDialog with wxPD_AUTO_HIDE style. We don't need to run a modal event loop waiting for the wxProgressDialog to be closed when it has wxPD_AUTO_HIDE style because it does it on its own. Closes #12472. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/progdlg.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/progdlg.cpp b/src/msw/progdlg.cpp index affd761eda..3f051ac95e 100644 --- a/src/msw/progdlg.cpp +++ b/src/msw/progdlg.cpp @@ -390,7 +390,10 @@ bool wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip) m_state = Finished; m_sharedData->m_state = Finished; m_sharedData->m_notifications |= wxSPDD_FINISHED; - if ( !HasPDFlag(wxPD_AUTO_HIDE) && newmsg.empty() ) + if ( HasPDFlag(wxPD_AUTO_HIDE) ) + return true; + + if ( newmsg.empty() ) { // Provide the finishing message if the application didn't. m_message = _("Done.");