diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-27 13:06:05 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-27 13:07:25 +0400 |
commit | d971c5785e0806ef3a49185b4e76a8d10e1a5bd0 (patch) | |
tree | aa7f706d2c207189cbaf28c50e52a8a1d150e2c5 /source/blender/makesrna/intern/rna_access.c | |
parent | 317f29d753ae601d9c4817769059c7fb2aadfbd1 (diff) |
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!
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |