Fix T41156: UILayout.prop_enum() does not observe "text" parameter override

We do have odd behaviors with name and expanded enums, but in this case it did
not made any sense at all! :)

Note the error was not in RNA, but in C UILayout api itself...
This commit is contained in:
Bastien Montagne 2014-07-23 14:31:44 +02:00
parent eb8f85d8be
commit cf9d5db75b
Notes: blender-bot 2023-02-14 10:18:53 +01:00
Referenced by issue #41156, UILayout.prop_enum() does not observe "text" parameter override
1 changed files with 2 additions and 2 deletions

View File

@ -1323,9 +1323,9 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
for (a = 0; item[a].identifier; a++) {
if (item[a].value == ivalue) {
const char *item_name = CTX_IFACE_(RNA_property_translation_context(prop), item[a].name);
const char *item_name = name ? name : CTX_IFACE_(RNA_property_translation_context(prop), item[a].name);
uiItemFullR(layout, ptr, prop, RNA_ENUM_VALUE, ivalue, 0, item_name ? item_name : name, icon ? icon : item[a].icon);
uiItemFullR(layout, ptr, prop, RNA_ENUM_VALUE, ivalue, 0, item_name, icon ? icon : item[a].icon);
break;
}
}