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:
authorAntonioya <blendergit@gmail.com>2016-08-27 13:52:30 +0300
committerAntonioya <blendergit@gmail.com>2016-08-27 13:52:30 +0300
commit2a6362255d8d0e1c5fd2c20495a76ceddaa8dbc8 (patch)
tree2eb96cc95f781a88253fdbabe53568f473e9a377
parentfef0cd81916f84b0efd9e059ac596c19e2627424 (diff)
GPencil: Cleanup change color operator
It is faster to assign the color to the pointer instead to force the new lookup in drawing function.
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 83dc0b679ee..9560ab188a4 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -879,9 +879,9 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *UNUSED(op))
continue;
/* asign new color (only if different) */
- if (STREQ(gps->colorname, color->info) == false) {
+ if ((STREQ(gps->colorname, color->info) == false) || (gps->palcolor != color)) {
BLI_strncpy(gps->colorname, color->info, sizeof(gps->colorname));
- gps->flag |= GP_STROKE_RECALC_COLOR;
+ gps->palcolor = color;
}
}
}