Commit: 8634c4646ead98db1c6a1a76393a77f911b50cab
Author: Antonio Vazquez
Date:   Mon Sep 23 12:55:16 2019 +0200
Branches: master
https://developer.blender.org/rB8634c4646ead98db1c6a1a76393a77f911b50cab

GPencil: Use correct comparison for non-bit values

===================================================================

M       source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M       source/blender/editors/gpencil/gpencil_edit.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c 
b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 832b71f7b2c..743a2fb546c 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1114,7 +1114,7 @@ static void 
gpencil_add_editpoints_vertexdata(GpencilBatchCache *cache,
      */
     const bool show_points = (show_sculpt_points) || (is_weight_paint) ||
                              (GPENCIL_EDIT_MODE(gpd) &&
-                              ((ts->gpencil_selectmode_edit & 
GP_SELECTMODE_STROKE) == 0));
+                              (ts->gpencil_selectmode_edit != 
GP_SELECTMODE_STROKE));
 
     if (cache->is_dirty) {
       if ((obact == ob) && ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
diff --git a/source/blender/editors/gpencil/gpencil_edit.c 
b/source/blender/editors/gpencil/gpencil_edit.c
index 5850d0856e0..2aea1084ad6 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -249,7 +249,7 @@ static int gpencil_selectmode_toggle_exec(bContext *C, 
wmOperator *op)
   ts->gpencil_selectmode_edit = mode;
 
   /* If the mode is Stroke, extend selection. */
-  if ((ob) && (ts->gpencil_selectmode_edit & GP_SELECTMODE_STROKE)) {
+  if ((ob) && (ts->gpencil_selectmode_edit == GP_SELECTMODE_STROKE)) {
     bGPdata *gpd = (bGPdata *)ob->data;
     /* Extend selection to all points in all selected strokes. */
     CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to