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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user