diff options
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_buttons.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_buttons.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 8a3c996a481..d90ec02b0c1 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -75,15 +75,17 @@ static void gp_ui_activelayer_cb(bContext *C, void *gpd, void *gpl) /* make sure the layer we want to remove is the active one */ gpencil_layer_setactive(gpd, gpl); - WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); + WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); /* XXX please work! */ } /* delete 'active' layer */ static void gp_ui_dellayer_cb(bContext *C, void *gpd, void *gpl) { - gpencil_layer_delete((bGPdata *)gpd, (bGPDlayer *)gpl); + /* make sure the layer we want to remove is the active one */ + gpencil_layer_setactive(gpd, gpl); + gpencil_layer_delactive(gpd); - WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); + WM_event_add_notifier(C, NC_SCREEN | ND_GPENCIL | NA_EDITED, NULL); /* XXX please work! */ } |