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:
@@ -1171,11 +1171,11 @@ int wxEnumProperty::GetIndexForValue( int value ) const
|
|||||||
if ( !m_choices.IsOk() )
|
if ( !m_choices.IsOk() )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
int intVal = m_choices.Index(value);
|
const int intVal = m_choices.Index(value);
|
||||||
if ( intVal >= 0 )
|
if ( intVal >= 0 )
|
||||||
return intVal;
|
return intVal;
|
||||||
|
|
||||||
return value;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxEnumProperty::~wxEnumProperty ()
|
wxEnumProperty::~wxEnumProperty ()
|
||||||
|
Reference in New Issue
Block a user