Made wxPD_AUTO_HIDE work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2001-12-22 21:20:34 +00:00
parent 62e1ba759a
commit 1c79904b9e

View File

@@ -342,7 +342,12 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
SetTimeLabel(remaining, m_remaining); SetTimeLabel(remaining, m_remaining);
} }
if ( (value == m_maximum ) && !(GetWindowStyle() & wxPD_AUTO_HIDE) ) if ( (value == m_maximum ) )
{
// so that we return TRUE below and that out [Cancel] handler knew what
// to do
m_state = Finished;
if( !(GetWindowStyle() & wxPD_AUTO_HIDE) )
{ {
if ( m_btnAbort ) if ( m_btnAbort )
{ {
@@ -362,15 +367,17 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
m_msg->SetLabel(_("Done.")); m_msg->SetLabel(_("Done."));
} }
// so that we return TRUE below and that out [Cancel] handler knew what
// to do
m_state = Finished;
wxYield(); wxYield();
(void)ShowModal(); (void)ShowModal();
} }
else else
{
Hide();
ReenableOtherWindows();
}
}
else
{ {
// update the display // update the display
wxYield(); wxYield();