diff --git a/include/property.h b/include/property.h index 1647094652..cfa1f72196 100644 --- a/include/property.h +++ b/include/property.h @@ -538,10 +538,10 @@ public: { static const wxString s_undef = "UNDEFINED"; - int idx = static_cast( value ); + int idx = m_choices.Index( static_cast( value ) ); if( idx >= 0 && idx < (int) m_choices.GetCount() ) - return m_choices.GetLabel( static_cast( value ) ); + return m_choices.GetLabel( static_cast( idx ) ); else return s_undef; }