From cf9d5db75b4c8599b6669a49c40e40938ac6a34b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 23 Jul 2014 14:31:44 +0200 Subject: 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... --- source/blender/editors/interface/interface_layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index ec956706fcc..645eb607031 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -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; } } -- cgit v1.2.3