Recoded the move-to-layer popup to wait for execution of operator until you 
press Enter or OK button.
That excludes undo/redo, which makes it faster for many too.

(note the menu is all hotkey driven, so it's MKEY, <number>, Enter)

Also fixed: missing MEM_free in this popup type.
This commit is contained in:
Ton Roosendaal
2012-11-13 14:34:36 +00:00
parent 5aee7c7744
commit 37cc2b4fdc
2 changed files with 3 additions and 1 deletions

View File

@@ -1233,7 +1233,7 @@ static int move_to_layer_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else {
move_to_layer_init(C, op);
return WM_operator_props_popup(C, op, event);
return WM_operator_props_dialog_popup(C, op, 260, 30);
}
}

View File

@@ -1186,6 +1186,8 @@ static void wm_operator_ui_popup_ok(struct bContext *C, void *arg, int retval)
if (op && retval > 0)
WM_operator_call(C, op);
MEM_freeN(data);
}
int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)