Fix wxEnumProperty::GetIndexForValue

GetIndexForValue should indicate that given property value does not exist by returning special index value(-1).

Closes #14450.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Artur Wieczorek
2014-07-08 15:56:34 +00:00
parent 71db47d26a
commit 954ee459b4

View File

@@ -1171,11 +1171,11 @@ int wxEnumProperty::GetIndexForValue( int value ) const
if ( !m_choices.IsOk() )
return -1;
int intVal = m_choices.Index(value);
const int intVal = m_choices.Index(value);
if ( intVal >= 0 )
return intVal;
return value;
return -1;
}
wxEnumProperty::~wxEnumProperty ()