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