diff options
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index a0a84bf4fc9..b4d0fcdee31 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -2026,11 +2026,9 @@ bool RNA_property_enum_item_from_value( bool RNA_property_enum_item_from_value_gettexted( bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, EnumPropertyItem *r_item) { - bool result; - - result = RNA_property_enum_item_from_value(C, ptr, prop, value, r_item); + const bool result = RNA_property_enum_item_from_value(C, ptr, prop, value, r_item); - if (!(prop->flag & PROP_ENUM_NO_TRANSLATE)) { + if (result && !(prop->flag & PROP_ENUM_NO_TRANSLATE)) { if (BLT_translate_iface()) { r_item->name = BLT_pgettext(prop->translation_context, r_item->name); } |