diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-18 18:55:39 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-18 20:38:20 +0300 |
commit | b08d9f036e05dd3546514239b5e3501b88cbf053 (patch) | |
tree | 06e22185fbe55114557937de263c4af345f157ac /source | |
parent | 77edcf5ff166ea16df56aeba27d3cf835baf621c (diff) |
UI: don't show Redo Unsupported, just hide buttons in that case.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 62941df25ca..a5762b8566f 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -4268,23 +4268,22 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs( op->properties = IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); } - if (flag & UI_TEMPLATE_OP_PROPS_SHOW_TITLE) { - uiItemL(layout, RNA_struct_ui_name(op->type->srna), ICON_NONE); - } - /* poll() on this operator may still fail, at the moment there is no nice feedback when this happens * just fails silently */ if (!WM_operator_repeat_check(C, op)) { UI_block_lock_set(block, true, "Operator can't' redo"); - - /* XXX, could give some nicer feedback or not show redo panel at all? */ - uiItemL(layout, IFACE_("* Redo Unsupported *"), ICON_NONE); + return return_info; } else { /* useful for macros where only one of the steps can't be re-done */ UI_block_lock_clear(block); } + if (flag & UI_TEMPLATE_OP_PROPS_SHOW_TITLE) { + uiItemL(layout, RNA_struct_ui_name(op->type->srna), ICON_NONE); + } + + /* menu */ if (op->type->flag & OPTYPE_PRESET) { /* XXX, no simple way to get WM_MT_operator_presets.bl_label from python! Label remains the same always! */ |