]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/datectrl.cpp
Remove debugging code accidentally left in
[wxWidgets.git] / src / msw / datectrl.cpp
index 2660838d00064c8a88c42b80a1de9f93b1e922ed..7f00c820f5910f082519d1015b7ddc759522c4a7 100644 (file)
@@ -141,7 +141,7 @@ wxDatePickerCtrl::Create(wxWindow *parent,
     if ( !MSWCreateControl(DATETIMEPICK_CLASS, wxEmptyString, pos, size) )
         return false;
 
-    if ( dt.IsValid() )
+    if ( dt.IsValid() || (style & wxDP_ALLOWNONE) )
         SetValue(dt);
 
     return true;
@@ -180,7 +180,9 @@ wxSize wxDatePickerCtrl::DoGetBestSize() const
 {
     const int y = GetCharHeight();
 
-    return wxSize(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
+    wxSize best(DEFAULT_ITEM_WIDTH, EDIT_HEIGHT_FROM_CHAR_HEIGHT(y));
+    CacheBestSize(best);
+    return best;
 }
 
 // ----------------------------------------------------------------------------