(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:
@@ -61,7 +61,7 @@ public:
|
|||||||
the program decided to continue the operation (e.g., user didn't
|
the program decided to continue the operation (e.g., user didn't
|
||||||
confirm it)
|
confirm it)
|
||||||
*/
|
*/
|
||||||
void Resume() { m_state = Continue; }
|
void Resume();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// callback for optional abort button
|
// callback for optional abort button
|
||||||
|
@@ -73,11 +73,11 @@ END_EVENT_TABLE()
|
|||||||
IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
|
IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// wxProgressDialog implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxProgressDialog
|
// wxProgressDialog creation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxProgressDialog::wxProgressDialog(wxString const &title,
|
wxProgressDialog::wxProgressDialog(wxString const &title,
|
||||||
@@ -308,6 +308,10 @@ wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,
|
|||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxProgressDialog operations
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool
|
bool
|
||||||
wxProgressDialog::Update(int value, const wxString& newmsg)
|
wxProgressDialog::Update(int value, const wxString& newmsg)
|
||||||
{
|
{
|
||||||
@@ -393,6 +397,15 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
|
|||||||
return m_state != Canceled;
|
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
|
// event handlers
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user