GPencil: Cleanup change color operator

It is faster to assign the color to the pointer instead to force the new
lookup in drawing function.
This commit is contained in:
Antonioya 2016-08-27 12:52:30 +02:00
parent fef0cd8191
commit 2a6362255d

@ -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;
}
}
}