diff options
author | Asad-ullah Khan <kh4n> | 2020-04-03 03:35:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-04-03 14:13:26 +0300 |
commit | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (patch) | |
tree | b6c5b95e2471ef4c6629e293f5f71f672a49db47 /source/blender/editors/sculpt_paint/sculpt.c | |
parent | 80513d85747c80f8c88800928885bae1f980580d (diff) |
Fix T74205: crash cancelling transfrom operation in sculpt mode
Differential Revision: https://developer.blender.org/D7018
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 8d4870f5dd8..db138bb907d 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -11076,7 +11076,11 @@ void ED_sculpt_end_transform(struct bContext *C) if (ss->filter_cache) { sculpt_filter_cache_free(ss); } - SCULPT_undo_push_end(); + /* Force undo push to happen even inside transform operator, since the sculpt + * undo system works separate from regular undo and this is require to properly + * finish an undo step also when cancelling. */ + const bool use_nested_undo = true; + SCULPT_undo_push_end_ex(use_nested_undo); sculpt_flush_update_done(C, ob, SCULPT_UPDATE_COORDS); } |