fix for assert which happened if the checkbox was cleared in a control with wxDP_ALLOWNONE style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d15e689395
commit
0c8433d097
@ -343,7 +343,8 @@ wxDatePickerCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
|
||||
// filter out duplicate DTN_DATETIMECHANGE events which the native
|
||||
// control sends us when using wxDP_DROPDOWN style
|
||||
if ( !m_date.IsValid() || dt != m_date )
|
||||
if ( (m_date.IsValid() != dt.IsValid()) ||
|
||||
(m_date.IsValid() && dt != m_date) )
|
||||
{
|
||||
m_date = dt;
|
||||
wxDateEvent event(this, dt, wxEVT_DATE_CHANGED);
|
||||
@ -353,6 +354,7 @@ wxDatePickerCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//else: both the old and new values are invalid, nothing changed
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user