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>2010-11-17 19:25:30 +0300
committerTon Roosendaal <ton@blender.org>2010-11-17 19:25:30 +0300
commit5f4f4e607b23061cd9519d24b5830f4060bde976 (patch)
treed630c911e392e8cad825684a65429a41d2207283 /source/blender/editors/space_view3d/view3d_toolbar.c
parentc8bcabaf40c287515e69d95afa9f13ad2178af4b (diff)
Bugfix #24767
Operator redo in 3D window now moves context to the main region, makes knife cut work (and probably others) Todo: this callback should be shared with other redo panels. On the todo list.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_toolbar.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index 840a5c1e6ba..1064611b84f 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -64,23 +64,34 @@
/* ******************* view3d space & buttons ************** */
-/* op->invoke */
+/* op->exec */
+/* XXX DUPLICATE CODE */
static void redo_cb(bContext *C, void *arg_op, void *UNUSED(arg2))
{
wmOperator *lastop= arg_op;
if(lastop) {
+ ARegion *ar= CTX_wm_region(C);
+ ARegion *ar1= BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW);
int retval;
+ if(ar1)
+ CTX_wm_region_set(C, ar1);
+
if (G.f & G_DEBUG)
printf("operator redo %s\n", lastop->type->name);
+
ED_undo_pop_op(C, lastop);
retval= WM_operator_repeat(C, lastop);
+
if((retval & OPERATOR_FINISHED)==0) {
if (G.f & G_DEBUG)
printf("operator redo failed %s\n", lastop->type->name);
ED_undo_redo(C);
}
+
+ /* set region back */
+ CTX_wm_region_set(C, ar);
}
}