diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-04-05 19:47:10 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-04-05 19:47:10 +0300 |
commit | 7748dd4ec735535f53f61d6aa4a2f6b9db9abdc1 (patch) | |
tree | 65f854f448a2503bef50781212355b74fa616839 /source/blender/editors/mesh/editmesh_knife.c | |
parent | 9e12a731db6f6647d5e6dfdaa32fc4d8117a523d (diff) | |
parent | b84255f590c07b129f726eadbfec72c73bfc2ee1 (diff) |
Merge remote-tracking branch 'origin/master' into temp-sculpt-colorstemp-sculpt-colors
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 64d10f7e2af..73716f6edba 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -4399,6 +4399,11 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) knifetool_exit(op); ED_workspace_status_text(C, NULL); + /* Exit early to prevent undo push for empty cuts. */ + if (kcd->totkvert == 0) { + return OPERATOR_CANCELLED; + } + return OPERATOR_FINISHED; case KNF_MODAL_UNDO: if (BLI_stack_is_empty(kcd->undostack)) { |