]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix hang on termination of wxProgressDialog with wxPD_AUTO_HIDE style.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Sep 2010 10:24:35 +0000 (10:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 14 Sep 2010 10:24:35 +0000 (10:24 +0000)
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

index affd761eda2b9c02ffcebe158949e31039ccc05e..3f051ac95e85793ed168c40663362cdbffbc8f29 100644 (file)
@@ -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.");