From f49d7d59dc0a83e074e9202a54c22f3c056aa5a6 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 19 Jan 2011 14:19:20 +0000 Subject: Bugfix #25652 Report was that move-to-layer menu failed. The real cause was more complex; had to dive deep in the dungeons of the interface code that handled undos and operators. Found several issues: - popup menus (like redo operator, color picker) executed again on a mouse-exit - far too many buttons were sending undo pushes; even worse, in the operator redo-panel each button action was pushed twice - in case operator redo-buttons have own callbacks (like layer buttons) the redo wasn't working - layerbutton menu was called without creating a proper undo/redo case Things should all work smoother now! On todo: - better definition and handling of all versions for operator menus (four types now, not fun) also: make operator "do" menu, which on first action does operator and then switches to redo-ing - bring back Undo menu, to list the undo stack and jump in it. --- source/blender/editors/space_view3d/view3d_toolbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_view3d/view3d_toolbar.c') diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 33ba1dbb7f9..3f69ce3e8a8 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -118,7 +118,8 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) if(ED_undo_valid(C, op->type->name)==0) uiLayoutSetEnabled(pa->layout, 0); - uiBlockSetFunc(block, ED_undo_operator_repeat_cb, op, NULL); + /* note, blockfunc is a default but->func, use Handle func to allow button callbacks too */ + uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, op); view3d_panel_operator_redo_operator(C, pa, op); } -- cgit v1.2.3