From: Vadim Zeitlin Date: Sun, 19 Nov 2006 15:11:24 +0000 (+0000) Subject: avoid assert when creating the control with wxCAL_SEQUENTIAL_MONTH_SELECTION style... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9576de5c8ba98414b940e319e37cb8cc762596ca avoid assert when creating the control with wxCAL_SEQUENTIAL_MONTH_SELECTION style introduced by last commit git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index f10b5015ca..1b4e84226f 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -202,6 +202,9 @@ bool wxCalendarCtrl::Create(wxWindow *parent, long style, const wxString& name) { + // set the style first to avoid assert in our SetWindowStyleFlag() + m_windowStyle = style; + if ( !wxControl::Create(parent, id, pos, size, style | wxCLIP_CHILDREN | wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE, wxDefaultValidator, name) )