Fixed bug: wxPG_EX_AUTO_UNSPECIFIED_VALUES was basically always on

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli 2008-10-03 17:39:17 +00:00
parent 0c931dd4eb
commit 104837f26e

View File

@ -892,6 +892,14 @@ bool wxPGProperty::OnEvent( wxPropertyGrid*, wxWindow*, wxEvent& )
void wxPGProperty::SetValue( wxVariant value, wxVariant* pList, int flags )
{
// If auto unspecified values are not wanted (via window or property style),
// then get default value instead of wxNullVariant.
if ( value.IsNull() && (flags & wxPG_SETVAL_BY_USER) &&
!UsesAutoUnspecified() )
{
value = GetDefaultValue();
}
if ( !value.IsNull() )
{
wxVariant tempListVariant;