diff --git a/include/wx/generic/progdlgg.h b/include/wx/generic/progdlgg.h index 08411b619f..11c64d291e 100644 --- a/include/wx/generic/progdlgg.h +++ b/include/wx/generic/progdlgg.h @@ -63,6 +63,8 @@ public: */ void Resume(); + bool Show( bool show = TRUE ); + protected: // callback for optional abort button void OnCancel(wxCommandEvent& event); diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 39bb6d1ef8..c99c98dac7 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -406,6 +406,17 @@ void wxProgressDialog::Resume() m_btnAbort->Enable(); } +bool wxProgressDialog::Show( bool show ) +{ + // reenable other windows before hiding this one because otherwise + // Windows wouldn't give the focus back to the window which had + // been previously focused because it would still be disabled + if(!show) + ReenableOtherWindows(); + + return wxDialog::Show(show); +} + // ---------------------------------------------------------------------------- // event handlers // ----------------------------------------------------------------------------