Create temporary wxEventLoop in wxGenericProgressDialog if needed.
wxGenericProgressDialog needs to have an active event loop in order to repaint itself and process clicks on its buttons but it's more helpful to create a temporary event loop if there is no currently active one instead of just asserting. In particular, this allows to use wxProgressDialog from overridden wxApp::OnInit(). Add temporary event loop creation and remove the now unnecessary asserts verifying that there is an active event loop as there always will be one. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "wx/dialog.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxButton;
|
||||
class WXDLLIMPEXP_FWD_CORE wxEventLoop;
|
||||
class WXDLLIMPEXP_FWD_CORE wxGauge;
|
||||
class WXDLLIMPEXP_FWD_CORE wxStaticText;
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindowDisabler;
|
||||
@@ -197,6 +198,11 @@ private:
|
||||
// for wxPD_APP_MODAL case
|
||||
wxWindowDisabler *m_winDisabler;
|
||||
|
||||
// Temporary event loop created by the dialog itself if there is no
|
||||
// currently active loop when it is created.
|
||||
wxEventLoop *m_tempEventLoop;
|
||||
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
wxDECLARE_NO_COPY_CLASS(wxGenericProgressDialog);
|
||||
};
|
||||
|
Reference in New Issue
Block a user