]> git.saurik.com Git - wxWidgets.git/commitdiff
ProgressDialog was *comletely* broken!
authorKarsten Ballüder <ballueder@usa.net>
Thu, 29 Jul 1999 12:51:12 +0000 (12:51 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Thu, 29 Jul 1999 12:51:12 +0000 (12:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/progdlgg.h
src/generic/progdlgg.cpp

index df9122d8a8194f784ec3e544d2d134e4768c432d..7ea2672c3557cb5bbbc71b2e7f72272240d136ee 100644 (file)
@@ -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,
index 0f9d5d899f96de27d27567e9eb1dde2956184647..d7ef8b88e6a6217773af89c145dcb96caccdaaa2 100644 (file)
@@ -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 )
        {