From d971c5785e0806ef3a49185b4e76a8d10e1a5bd0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 27 Feb 2014 15:06:05 +0600 Subject: Fix root of the issue of bad_cast bug in localization No need to call l10n stuff when it's disabled in the preferences. Reviewed by @mont29, thanks! --- source/blender/makesrna/intern/rna_access.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 4bb04b792ef..86ef2f1b74f 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1444,7 +1444,11 @@ bool RNA_property_enum_name_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA result = RNA_property_enum_name(C, ptr, prop, value, name); if (result) { - *name = BLF_pgettext(prop->translation_context, *name); + if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) { + if (BLF_translate_iface()) { + *name = BLF_pgettext(prop->translation_context, *name); + } + } } return result; -- cgit v1.2.3