diff options
author | Dan Eicher <dan@eu.phorio.us> | 2012-10-05 23:51:11 +0400 |
---|---|---|
committer | Dan Eicher <dan@eu.phorio.us> | 2012-10-05 23:51:11 +0400 |
commit | ba470956274cc4086ee153e4f9bdda9d2ff714f5 (patch) | |
tree | 354dc117929e6fcda353a0a4219cfe449bcebecc /source/blender/editors/space_view3d/space_view3d.c | |
parent | db5682ac8c53377e819fd50357de580c02405fca (diff) |
Grease Pencil notifier/listener cleanup
As suggested by Campbell on the IRC gave grease pencil its own notifier type (NC_GPENCIL) and made the makesrna notifier functions actually update properly.
Also got the #ifdef'd GreasePencil.layers.[new/remove] functions working.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 1e371cb074d..236cbb86724 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -776,7 +776,6 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) break; case NC_SCREEN: switch (wmn->data) { - case ND_GPENCIL: case ND_ANIMPLAY: case ND_SKETCH: ED_region_tag_redraw(ar); @@ -793,6 +792,10 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; + case NC_GPENCIL: + if (wmn->action == NA_EDITED) + ED_region_tag_redraw(ar); + break; } } @@ -941,8 +944,8 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) if (wmn->action == NA_RENAME) ED_region_tag_redraw(ar); break; - case NC_SCREEN: - if (wmn->data == ND_GPENCIL) + case NC_GPENCIL: + if (wmn->data == ND_DATA) ED_region_tag_redraw(ar); break; } |