diff options
author | Antonioya <blendergit@gmail.com> | 2016-08-27 13:52:30 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2016-08-27 13:52:30 +0300 |
commit | 2a6362255d8d0e1c5fd2c20495a76ceddaa8dbc8 (patch) | |
tree | 2eb96cc95f781a88253fdbabe53568f473e9a377 | |
parent | fef0cd81916f84b0efd9e059ac596c19e2627424 (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.c | 4 |
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; } } } |