diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-19 14:44:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-19 14:44:51 +0300 |
commit | 8f495326bf12c5f23bd6bd7c1e4d71147593f663 (patch) | |
tree | 3010abf0c8212d4d71ca89e143a79a5025bd3e99 /source/blender/editors/mesh/editmesh_bisect.c | |
parent | 42dbae5d28b182684026a8791354819b0da907fc (diff) |
Fix operators adding manipulators multiple times
Running spin or bisect twice in a row added widget groups each time.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_bisect.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bisect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index c9f083e2089..ca84de74b3d 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -200,7 +200,7 @@ static int mesh_bisect_modal(bContext *C, wmOperator *op, const wmEvent *event) { View3D *v3d = CTX_wm_view3d(C); if (v3d && (v3d->twtype & V3D_MANIPULATOR_DRAW)) { - WM_manipulator_group_type_add("MESH_WGT_bisect"); + WM_manipulator_group_type_ensure("MESH_WGT_bisect"); } } #endif @@ -675,6 +675,9 @@ static void manipulator_mesh_bisect_draw_prepare( const bContext *UNUSED(C), wmManipulatorGroup *mgroup) { ManipulatorGroup *man = mgroup->customdata; + if (man->data.op->next) { + man->data.op = WM_operator_last_redo((bContext *)man->data.context); + } manipulator_mesh_bisect_update_from_op(man); } |