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:
@@ -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++;
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user