Operator redo: F6 menu didn't work for macros yet (like Duplicate-grab).
This commit is contained in:
Ton Roosendaal 2011-06-09 15:26:05 +00:00
parent 15d0d3f41e
commit cede08e1e2
2 changed files with 11 additions and 9 deletions

@ -2461,13 +2461,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot)
static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
{
wmWindowManager *wm= CTX_wm_manager(C);
wmOperator *lastop;
/* only for operators that are registered and did an undo push */
for(lastop= wm->operators.last; lastop; lastop= lastop->prev)
if((lastop->type->flag & OPTYPE_REGISTER) && (lastop->type->flag & OPTYPE_UNDO))
break;
wmOperator *lastop= WM_operator_last_redo(C);
if(lastop)
WM_operator_redo_popup(C, lastop);

@ -921,7 +921,16 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
if(ED_undo_valid(C, op->type->name)==0)
uiLayoutSetEnabled(layout, 0);
uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE);
if(op->type->flag & OPTYPE_MACRO) {
for(op= op->macro.first; op; op= op->next) {
uiItemL(layout, op->type->name, ICON_NONE);
uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE);
}
}
else {
uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE);
}
uiPopupBoundsBlock(block, 4, 0, 0);
uiEndBlock(C, block);
@ -3125,7 +3134,6 @@ static int radial_control_cancel(bContext *C, wmOperator *op)
static int radial_control_modal(bContext *C, wmOperator *op, wmEvent *event)
{
RadialControl *rc = op->customdata;
wmWindowManager *wm;
float new_value, dist, zoom[2];
float delta[2], snap, ret = OPERATOR_RUNNING_MODAL;