UI: disable advanced option for redo popover

This commit is contained in:
Campbell Barton 2018-04-25 10:08:04 +02:00
parent d63b66be82
commit f210c93945
1 changed files with 10 additions and 4 deletions

View File

@ -1551,10 +1551,12 @@ static void template_operator_redo_property_buts_draw(
else {
/* Might want to make label_align adjustable somehow. */
eAutoPropButsReturn return_info = uiTemplateOperatorPropertyButs(
C, layout, op, template_operator_redo_property_buts_poll,
UI_BUT_LABEL_ALIGN_NONE, layout_flags);
C, layout, op, r_has_advanced ? template_operator_redo_property_buts_poll : NULL,
UI_BUT_LABEL_ALIGN_NONE, layout_flags);
if (return_info & UI_PROP_BUTS_ANY_FAILED_CHECK) {
*r_has_advanced = true;
if (r_has_advanced) {
*r_has_advanced = true;
}
}
}
}
@ -1576,15 +1578,19 @@ void uiTemplateOperatorRedoProperties(uiLayout *layout, bContext *C)
#endif
if (WM_operator_repeat_check(C, op)) {
#if 0
bool has_advanced = false;
#endif
UI_block_func_set(block, ED_undo_operator_repeat_cb, op, NULL);
template_operator_redo_property_buts_draw(C, op, layout, UI_TEMPLATE_OP_PROPS_COMPACT, &has_advanced);
template_operator_redo_property_buts_draw(C, op, layout, UI_TEMPLATE_OP_PROPS_COMPACT, NULL /* &has_advanced */ );
UI_block_func_set(block, NULL, NULL, NULL); /* may want to reset to old state instead of NULLing all */
#if 0
if (has_advanced) {
uiItemO(layout, IFACE_("More..."), ICON_NONE, "SCREEN_OT_redo_last");
}
#endif
}
}