Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2011-01-19 17:19:20 +0300
committerTon Roosendaal <ton@blender.org>2011-01-19 17:19:20 +0300
commitf49d7d59dc0a83e074e9202a54c22f3c056aa5a6 (patch)
treec8fd6497130413a182bec254cf3d142e670f0ecc /source/blender/editors/space_view3d/view3d_toolbar.c
parent450288999c74cbef4678e804bbb28d7ebf5752fb (diff)
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.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_toolbar.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c3
1 files changed, 2 insertions, 1 deletions
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);
}