From: Karsten Ballüder Date: Thu, 29 Jul 1999 12:51:12 +0000 (+0000) Subject: ProgressDialog was *comletely* broken! X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bbdb0e1313e5fe26df04bc14bae1a1c723332102 ProgressDialog was *comletely* broken! git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/generic/progdlgg.h b/include/wx/generic/progdlgg.h index df9122d8a8..7ea2672c35 100644 --- a/include/wx/generic/progdlgg.h +++ b/include/wx/generic/progdlgg.h @@ -80,6 +80,8 @@ private: class wxStaticText *m_msg; // disable all or parent window only bool m_disableParentOnly; + // auto-hide? + bool m_AutoHide; // displayed elapsed, estimated, remaining time class wxStaticText *m_elapsed, *m_estimated, diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 0f9d5d899f..d7ef8b88e6 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -86,11 +86,12 @@ wxProgressDialog::wxProgressDialog(wxString const &title, int maximum, wxWindow *parent, int style) - : wxDialog(m_parent, -1, title) + : wxDialog(parent, -1, title) { bool hasAbortButton = (style & wxPD_CAN_ABORT) != 0; m_state = hasAbortButton ? Continue : Uncancelable; m_disableParentOnly = (style & wxPD_APP_MODAL) == 0; + m_AutoHide = (style & wxPD_AUTO_HIDE) != 0; m_parent = parent; m_maximum = maximum; @@ -275,7 +276,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg) SetTimeLabel(remaining, m_remaining); } - if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) ) + if ( (value == m_maximum ) && !m_AutoHide ) { if ( m_btnAbort ) {