Use wxVariant::IsType() function to check the type of variant values in wxPG.
Since there is a dedicated function to check the type of variant then there is not necessary to call wxVariant::GetType() function and perform explicit comparisons of returned strings.
This commit is contained in:
@@ -1984,7 +1984,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos,
|
||||
wxVariant attrVal = prop->GetAttribute(wxPG_ATTR_AUTOCOMPLETE);
|
||||
if ( !attrVal.IsNull() )
|
||||
{
|
||||
wxASSERT(attrVal.GetType() == wxS("arrstring"));
|
||||
wxASSERT(attrVal.IsType(wxS("arrstring")));
|
||||
tc->AutoComplete(attrVal.GetArrayString());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user