]> git.saurik.com Git - wxWidgets.git/commitdiff
fix assert when leaving control with wxDP_ALLOWNONE style (patch 1190145)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 May 2005 22:17:47 +0000 (22:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 22 May 2005 22:17:47 +0000 (22:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datectlg.cpp

index b08865412933e0ac7297fe7fc5ee0a8e00351840..299aec46f77c0f470a5d63ed81429a1b79752177 100644 (file)
@@ -867,7 +867,7 @@ void wxDatePickerCtrlGeneric::OnKillFocus(wxFocusEvent &ev)
         m_txt->SetValue(wxEmptyString);
 
     // notify that we had to change the date after validation
-    if ( (dt.IsValid() && m_currentDate != dt) ||
+    if ( (dt.IsValid() && (!m_currentDate.IsValid() || m_currentDate != dt)) ||
             (!dt.IsValid() && m_currentDate.IsValid()) )
     {
         m_currentDate = dt;