From: Vadim Zeitlin Date: Fri, 22 May 2009 22:46:18 +0000 (+0000) Subject: initialize wxDocChildFrameAnyBase before creating the real window to ensure that... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e5033ed2f14abe91c3c39f2f47f35d20d600a84e initialize wxDocChildFrameAnyBase before creating the real window to ensure that event handling is set up properly before the first events for the new window are received (closes #10825) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/docview.h b/include/wx/docview.h index d3e109eb60..0ac6cdcb3e 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -521,7 +521,12 @@ class WXDLLIMPEXP_CORE wxDocChildFrameAnyBase { public: // default ctor, use Create() after it - wxDocChildFrameAnyBase() { m_win = NULL; } + wxDocChildFrameAnyBase() + { + m_childDocument = NULL; + m_childView = NULL; + m_win = NULL; + } // full ctor equivalent to using the default one and Create(0 wxDocChildFrameAnyBase(wxDocument *doc, wxView *view, wxWindow *win) @@ -631,10 +636,10 @@ public: long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) { - if ( !BaseClass::Create(parent, id, title, pos, size, style, name) ) + if ( !wxDocChildFrameAnyBase::Create(doc, view, this) ) return false; - if ( !wxDocChildFrameAnyBase::Create(doc, view, this) ) + if ( !BaseClass::Create(parent, id, title, pos, size, style, name) ) return false; this->Connect(wxEVT_ACTIVATE,