Fix extrude gizmo redo after selection glitch
authorCampbell Barton <ideasman42@gmail.com>
Sat, 8 Sep 2018 03:36:47 +0000 (13:36 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 8 Sep 2018 03:36:47 +0000 (13:36 +1000)
It was possible to adjust extrusion after selection.

source/blender/editors/mesh/editmesh_extrude.c

index d54437913f42cc946ece76802d4ad9eceab5741b..fa6a1f7b60cf29529955e16b3cb23dd598d192b8 100644 (file)
@@ -567,7 +567,9 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup)
                WM_gizmo_set_matrix_location(man->adjust_xyz_no[i], tbounds.center);
        }
 
-       wmOperator *op = WM_operator_last_redo(C);
+       /* Adjust current operator. */
+       /* Don't use 'WM_operator_last_redo' because selection actions will be ignored. */
+       wmOperator *op = CTX_wm_manager(C)->operators.last;
        bool has_redo = (op && op->type == man->ot_extrude);
 
        /* Un-hide. */