ProgressDialog was *comletely* broken!

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-07-29 12:51:12 +00:00
parent 45ccdd76c3
commit bbdb0e1313
2 changed files with 5 additions and 2 deletions

View File

@@ -80,6 +80,8 @@ private:
class wxStaticText *m_msg; class wxStaticText *m_msg;
// disable all or parent window only // disable all or parent window only
bool m_disableParentOnly; bool m_disableParentOnly;
// auto-hide?
bool m_AutoHide;
// displayed elapsed, estimated, remaining time // displayed elapsed, estimated, remaining time
class wxStaticText *m_elapsed, class wxStaticText *m_elapsed,
*m_estimated, *m_estimated,

View File

@@ -86,11 +86,12 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
int maximum, int maximum,
wxWindow *parent, wxWindow *parent,
int style) int style)
: wxDialog(m_parent, -1, title) : wxDialog(parent, -1, title)
{ {
bool hasAbortButton = (style & wxPD_CAN_ABORT) != 0; bool hasAbortButton = (style & wxPD_CAN_ABORT) != 0;
m_state = hasAbortButton ? Continue : Uncancelable; m_state = hasAbortButton ? Continue : Uncancelable;
m_disableParentOnly = (style & wxPD_APP_MODAL) == 0; m_disableParentOnly = (style & wxPD_APP_MODAL) == 0;
m_AutoHide = (style & wxPD_AUTO_HIDE) != 0;
m_parent = parent; m_parent = parent;
m_maximum = maximum; m_maximum = maximum;
@@ -275,7 +276,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
SetTimeLabel(remaining, m_remaining); SetTimeLabel(remaining, m_remaining);
} }
if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) ) if ( (value == m_maximum ) && !m_AutoHide )
{ {
if ( m_btnAbort ) if ( m_btnAbort )
{ {