Properly handle choices mapped

If the choice is an integer, we need to be able to handle it directly
because we can't get the wxAny to a wxString if the underlying type
doesn't map
This commit is contained in:
Seth Hillbrand
2025-10-11 22:54:29 -07:00
parent 1a7c6d0bdc
commit 42a76dd4bd
+8 -1
View File
@@ -83,7 +83,14 @@ public:
wxPGChoices choices = aProperty->GetChoices( this );
if( choices.GetCount() )
aProperty->set<wxString>( object, choices.GetLabel( aValue.GetInteger() ) );
{
// If the property type is int, use the choice value directly
// Otherwise, convert to the choice label string
if( aProperty->TypeHash() == TYPE_HASH( int ) )
aProperty->set<int>( object, aValue.GetInteger() );
else
aProperty->set<wxString>( object, choices.GetLabel( aValue.GetInteger() ) );
}
else
aProperty->set<wxVariant>( object, aValue );