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:
parent
45ccdd76c3
commit
bbdb0e1313
@ -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,
|
||||
|
@ -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 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user