fix [#28751] Item in Enum propertie is grayed out

was infact a very old bug where an empty title took the following word for the title, eg: "%t|First Item|Second Item"
the first item would be evaluated as a title.
This commit is contained in:
Campbell Barton
2011-09-27 16:23:40 +00:00
parent cb7b7b3b9e
commit aaae90af33
2 changed files with 2 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ static MenuData *decompose_menu_string(const char *str)
*s= '\0';
s++;
} else if (s[1]=='t') {
nitem_is_title= 1;
nitem_is_title= (s[2] != '|'); /* check for empty title */
*s= '\0';
s++;

View File

@@ -973,7 +973,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
PyErr_Format(PyExc_TypeError,
"EnumProperty(..., default=\'%s\'): not found in enum members",
def);
def_cmp);
return NULL;
}
}