Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-12-03 19:18:01 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-12-03 19:18:01 +0300
commitc821aa8ca76b219e51bbc1f6b840efd6152c045e (patch)
tree76d0955dce916e6c4cf1ca95a44deec5163ea364
parent986955a2d53a5fd94be38f22e0eb954333763aff (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.c5
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);