diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-23 16:31:44 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-23 16:34:21 +0400 |
commit | cf9d5db75b4c8599b6669a49c40e40938ac6a34b (patch) | |
tree | 39dd7644751b5e4de82883c167f4fb5fa3947742 | |
parent | eb8f85d8be8a14cbb8e97ba3b91c02cfd0ebbe42 (diff) |
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...
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 4 |
1 files 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; } } |