[Bf-blender-cvs] [b08d9f036e0] blender2.8: UI: don't show Redo Unsupported, just hide buttons in that case.
Brecht Van Lommel
noreply at git.blender.org
Tue Sep 18 19:39:05 CEST 2018
Commit: b08d9f036e05dd3546514239b5e3501b88cbf053
Author: Brecht Van Lommel
Date: Tue Sep 18 17:55:39 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb08d9f036e05dd3546514239b5e3501b88cbf053
UI: don't show Redo Unsupported, just hide buttons in that case.
===================================================================
M source/blender/editors/interface/interface_templates.c
===================================================================
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! */
More information about the Bf-blender-cvs
mailing list