diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operator_type.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c index 1cec9848104..5c9093168bd 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.c +++ b/source/blender/windowmanager/intern/wm_operator_type.c @@ -586,12 +586,13 @@ static void wm_operatortype_free_macro(wmOperatorType *ot) const char *WM_operatortype_name(struct wmOperatorType *ot, struct PointerRNA *properties) { + const char *name = NULL; + if (ot->get_name && properties) { - return ot->get_name(ot, properties); - } - else { - return RNA_struct_ui_name(ot->srna); + name = ot->get_name(ot, properties); } + + return (name && name[0]) ? name : RNA_struct_ui_name(ot->srna); } /** \} */ |