switching to registry based type info
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -412,8 +412,17 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxxVariant nodeval ;
|
||||
callbacks->SetProperty( objectID, classInfo ,pi , ReadValue( prop , pi->GetTypeInfo() ) ) ;
|
||||
wxxVariant nodeval = ReadValue( prop , pi->GetTypeInfo() ) ;
|
||||
if( pi->GetFlags() & wxPROP_ENUM_STORE_LONG )
|
||||
{
|
||||
const wxEnumTypeInfo *eti = dynamic_cast<const wxEnumTypeInfo*>( pi->GetTypeInfo() ) ;
|
||||
wxASSERT_MSG( eti , wxT("Type must have enum - long conversion") ) ;
|
||||
|
||||
long realval ;
|
||||
eti->ConvertToLong( nodeval , realval ) ;
|
||||
nodeval = wxxVariant( realval ) ;
|
||||
}
|
||||
callbacks->SetProperty( objectID, classInfo ,pi , nodeval ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user