Grease Pencil notifier/listener cleanup
[blender.git] / source / blender / editors / space_clip / space_clip.c
index 3f925df30c76ce61ca56a27f75f304eaabe03827..ffe4762ad1551f754ac93f1e29ec18aa80291f5f 100644 (file)
@@ -407,8 +407,6 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
                case NC_SCREEN:
                        switch (wmn->data) {
                                case ND_ANIMPLAY:
-                               case ND_GPENCIL:
-                                       clip_scopes_check_gpencil_change(sa);
                                        ED_area_tag_redraw(sa);
                                        break;
                        }
@@ -420,6 +418,12 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
                                ED_area_tag_redraw(sa);
                        }
                        break;
+               case NC_GPENCIL:
+                       if (wmn->action == NA_EDITED) {
+                               clip_scopes_check_gpencil_change(sa);
+                               ED_area_tag_redraw(sa);
+                       }
+                       break;
        }
 }
 
@@ -1159,8 +1163,8 @@ static void clip_main_area_listener(ARegion *ar, wmNotifier *wmn)
 {
        /* context changes */
        switch (wmn->category) {
-               case NC_SCREEN:
-                       if (wmn->data == ND_GPENCIL)
+               case NC_GPENCIL:
+                       if (wmn->action == NA_EDITED)
                                ED_region_tag_redraw(ar);
                        break;
        }
@@ -1373,8 +1377,8 @@ static void clip_props_area_listener(ARegion *ar, wmNotifier *wmn)
                        if (wmn->data == ND_SPACE_CLIP)
                                ED_region_tag_redraw(ar);
                        break;
-               case NC_SCREEN:
-                       if (wmn->data == ND_GPENCIL)
+               case NC_GPENCIL:
+                       if (wmn->action == NA_EDITED)
                                ED_region_tag_redraw(ar);
                        break;
        }
@@ -1406,8 +1410,8 @@ static void clip_properties_area_listener(ARegion *ar, wmNotifier *wmn)
 {
        /* context changes */
        switch (wmn->category) {
-               case NC_SCREEN:
-                       if (wmn->data == ND_GPENCIL)
+               case NC_GPENCIL:
+                       if (wmn->data == ND_DATA)
                                ED_region_tag_redraw(ar);
                        break;
                case NC_BRUSH: