diff options
author | Antonioya <blendergit@gmail.com> | 2019-01-02 19:10:37 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-01-02 19:10:37 +0300 |
commit | 7765277240c8d54ac290cf35c08f7f7d046e4ae2 (patch) | |
tree | fb1effa8f967f7c25e0ba8142677d17a96ff6488 /source/blender/editors/gpencil | |
parent | ae50a7df037e63863815b54ca53b4dbf3cda2799 (diff) |
Fix T60031: Joining two Grease Pencilobjects sometimes crashes
The drawing cache was not set as dirty and drawing engine used old data.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 51046726e19..a8cfe91740c 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -2140,6 +2140,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op) BKE_animdata_merge_copy(bmain, &gpd_dst->id, &gpd_src->id, ADT_MERGECOPY_KEEP_DST, false); } } + DEG_id_tag_update(&gpd_src->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); } /* Free the old object */ @@ -2148,6 +2149,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op) } CTX_DATA_END; + DEG_id_tag_update(&gpd_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); DEG_relations_tag_update(bmain); /* because we removed object(s) */ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); |