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!
This commit is contained in:
2014-02-27 15:06:05 +06:00
parent 317f29d753
commit d971c5785e

View File

@@ -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;