Fix bug which would throw away all enum values after a Get().

(It was allocating a stack variable copy of the singleton, which
when freed cleared the singleton's m_choices.)

https://forum.kicad.info/t/need-some-guinea-pigs-for-a-rule-based-drc-prototype/22955/85
This commit is contained in:
Jeff Young 2020-07-23 13:28:09 +01:00
parent f2812773d4
commit ac6ceb84bf
1 changed files with 1 additions and 1 deletions

View File

@ -583,7 +583,7 @@ private:
wxAnyValueType* dstType, wxAnyValueBuffer& dst ) const override\
{\
type value = GetValue(src);\
ENUM_MAP<type> conv = ENUM_MAP<type>::Instance();\
ENUM_MAP<type>& conv = ENUM_MAP<type>::Instance();\
if( dstType->CheckType<wxString>() )\
{\
wxAnyValueTypeImpl<wxString>::SetValue( conv.ToString( value ), dst );\