]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/calctrl.cpp
floating pane size now restores after perspective restore
[wxWidgets.git] / src / generic / calctrl.cpp
index f10b5015ca6b8adb38648b18d4fd987a06e927d8..2fb1c4172545e31bfa8cae08e4d8786afefeea66 100644 (file)
@@ -202,6 +202,9 @@ bool wxCalendarCtrl::Create(wxWindow *parent,
                             long style,
                             const wxString& name)
 {
                             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) )
     if ( !wxControl::Create(parent, id, pos, size,
                             style | wxCLIP_CHILDREN | wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
                             wxDefaultValidator, name) )
@@ -253,6 +256,14 @@ wxCalendarCtrl::~wxCalendarCtrl()
     {
         delete m_attrs[n];
     }
     {
         delete m_attrs[n];
     }
+
+    if ( !HasFlag(wxCAL_SEQUENTIAL_MONTH_SELECTION) )
+    {
+        delete m_comboMonth;
+        delete m_staticMonth;
+        delete m_spinYear;
+        delete m_staticYear;
+    }
 }
 
 void wxCalendarCtrl::SetWindowStyleFlag(long style)
 }
 
 void wxCalendarCtrl::SetWindowStyleFlag(long style)