(re)enable Cancel button in Resume()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-06-04 18:08:39 +00:00
parent cb59313ce5
commit db1a42b874
2 changed files with 16 additions and 3 deletions

View File

@ -61,7 +61,7 @@ public:
the program decided to continue the operation (e.g., user didn't
confirm it)
*/
void Resume() { m_state = Continue; }
void Resume();
protected:
// callback for optional abort button

View File

@ -73,11 +73,11 @@ END_EVENT_TABLE()
IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
// ============================================================================
// implementation
// wxProgressDialog implementation
// ============================================================================
// ----------------------------------------------------------------------------
// wxProgressDialog
// wxProgressDialog creation
// ----------------------------------------------------------------------------
wxProgressDialog::wxProgressDialog(wxString const &title,
@ -308,6 +308,10 @@ wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,
return label;
}
// ----------------------------------------------------------------------------
// wxProgressDialog operations
// ----------------------------------------------------------------------------
bool
wxProgressDialog::Update(int value, const wxString& newmsg)
{
@ -393,6 +397,15 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
return m_state != Canceled;
}
void wxProgressDialog::Resume()
{
m_state = Continue;
// it may have been disabled by OnCancel(), so enable it back to let the
// user interrupt us again if needed
m_btnAbort->Enable();
}
// ----------------------------------------------------------------------------
// event handlers
// ----------------------------------------------------------------------------