diff --git a/include/inspectable.h b/include/inspectable.h index be77d8a216..e649c53d75 100644 --- a/include/inspectable.h +++ b/include/inspectable.h @@ -83,7 +83,14 @@ public: wxPGChoices choices = aProperty->GetChoices( this ); if( choices.GetCount() ) - aProperty->set( 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( object, aValue.GetInteger() ); + else + aProperty->set( object, choices.GetLabel( aValue.GetInteger() ) ); + } else aProperty->set( object, aValue );