Fix missing broken notifiers
authorDalai Felinto <dfelinto@gmail.com>
Thu, 25 Jan 2018 12:10:21 +0000 (10:10 -0200)
committerDalai Felinto <dfelinto@gmail.com>
Thu, 25 Jan 2018 12:10:58 +0000 (10:10 -0200)
We can't have more than one NOTE_SUBTYPE in the same notifier.
Instead of calling both subtypes the code end up not calling either.

source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_nla/nla_select.c

index bd5a42df99a7eb6123e2fca9c22ba2656b6f8d32..726215255aa2ec5636e7b431a6d8e6db0b3f471b 100644 (file)
@@ -103,7 +103,8 @@ static int gpencil_editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op))
                ED_gpencil_reset_layers_parent(gpd);
        }
 
-       WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
+       WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
+       WM_event_add_notifier(C, NC_GPENCIL | ND_GPENCIL_EDITMODE, NULL);
        WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
        
        return OPERATOR_FINISHED;
@@ -151,7 +152,8 @@ static int gpencil_hideselect_toggle_exec(bContext *C, wmOperator *UNUSED(op))
                ts->gp_sculpt.alpha = 1.0f;
        }
 
-       WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | ND_GPENCIL_EDITMODE, NULL);
+       WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL);
+       WM_event_add_notifier(C, NC_GPENCIL | ND_GPENCIL_EDITMODE, NULL);
        WM_event_add_notifier(C, NC_SCENE | ND_MODE, NULL);
 
        return OPERATOR_FINISHED;
index 2a617f91e6cc4b287e9d34bf1d933852c94cbbaf..49d74c2563364cf3106477fbef031985863756f6 100644 (file)
@@ -425,7 +425,8 @@ static int material_slot_move_exec(bContext *C, wmOperator *op)
        MEM_freeN(slot_remap);
 
        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
-       WM_event_add_notifier(C, NC_OBJECT | ND_DRAW | ND_DATA, ob);
+       WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
+       WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
 
        return OPERATOR_FINISHED;
 }
index 1c55a0d76cfdc9cf5d531c64c125c89c78ab6fff..110c4d1789d58a8f8958d2567d48184963ec2e93 100644 (file)
@@ -1127,7 +1127,8 @@ static int actkeys_select_leftright_exec(bContext *C, wmOperator *op)
        actkeys_select_leftright(&ac, leftright, selectmode);
        
        /* set notifier that keyframe selection (and channels too) have changed */
-       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
        
        return OPERATOR_FINISHED;
 }
@@ -1577,7 +1578,8 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, const wmEvent
        mouse_action_keys(&ac, event->mval, selectmode, column, channel);
        
        /* set notifier that keyframe selection (and channels too) have changed */
-       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
        
        /* for tweak grab to work */
        return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
index 1683fbdbdb9081fca67bbd4f217b13afc9aa605f..392db4ef4b5a9e72143d78ecfd0d62d151f5ef50 100644 (file)
@@ -1003,7 +1003,8 @@ static int graphkeys_select_leftright_exec(bContext *C, wmOperator *op)
        graphkeys_select_leftright(&ac, leftright, selectmode);
        
        /* set notifier that keyframe selection (and channels too) have changed */
-       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
        
        return OPERATOR_FINISHED;
 }
@@ -1517,7 +1518,8 @@ static int graphkeys_clickselect_invoke(bContext *C, wmOperator *op, const wmEve
        }
        
        /* set notifier that keyframe selection (and also channel selection in some cases) has changed */
-       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
        
        /* for tweak grab to work */
        return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
index 1179401f34602a1d48206691d02d83f838cfbde2..e09e4417d5d239ecf0f0d854511a007311713636 100644 (file)
@@ -444,7 +444,8 @@ static int nlaedit_select_leftright_exec(bContext *C, wmOperator *op)
        nlaedit_select_leftright(C, &ac, leftright, selectmode);
        
        /* set notifier that keyframe selection (and channels too) have changed */
-       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | ND_ANIMCHAN | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_SELECTED, NULL);
        
        return OPERATOR_FINISHED;
 }