diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-12-03 19:18:01 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-12-03 19:18:01 +0300 |
commit | c821aa8ca76b219e51bbc1f6b840efd6152c045e (patch) | |
tree | 76d0955dce916e6c4cf1ca95a44deec5163ea364 | |
parent | 986955a2d53a5fd94be38f22e0eb954333763aff (diff) |
GPencil: Fix unreported refresh of stroke after using Arrange operator
When change the order of the stroke using the arrange operator, the arrange was done, but the viewport did not display the result until you refresh the viewport.
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index a963632a01b..33a1469beab 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -1586,6 +1586,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) gps = link->data; BLI_remlink(&gpf->strokes, gps); BLI_addtail(&gpf->strokes, gps); + changed = true; } break; /* Bring Forward */ @@ -1593,6 +1594,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) LISTBASE_FOREACH_BACKWARD (LinkData *, link, &selected) { gps = link->data; BLI_listbase_link_move(&gpf->strokes, gps, 1); + changed = true; } break; /* Send Backward */ @@ -1600,6 +1602,7 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) LISTBASE_FOREACH (LinkData *, link, &selected) { gps = link->data; BLI_listbase_link_move(&gpf->strokes, gps, -1); + changed = true; } break; /* Send to Back */ @@ -1608,12 +1611,12 @@ static int gpencil_stroke_arrange_exec(bContext *C, wmOperator *op) gps = link->data; BLI_remlink(&gpf->strokes, gps); BLI_addhead(&gpf->strokes, gps); + changed = true; } break; default: BLI_assert(0); break; - changed = true; } } BLI_freelistN(&selected); |