Outliner - Notify on GP Layer Change

This adds NA_SELECTED to notifier when selecting Grease Pencil layers so Properties Editor will update

Differential Revision: https://developer.blender.org/D5073

Reviewed by Dalai Felinto
This commit is contained in:
Harley Acheson
2019-06-14 09:48:42 -07:00
parent f51de2246c
commit e76b223ea3
5 changed files with 5 additions and 5 deletions

View File

@@ -510,7 +510,7 @@ static void buttons_area_listener(wmWindow *UNUSED(win),
case NC_GPENCIL:
switch (wmn->data) {
case ND_DATA:
if (ELEM(wmn->action, NA_EDITED, NA_ADDED, NA_REMOVED)) {
if (ELEM(wmn->action, NA_EDITED, NA_ADDED, NA_REMOVED, NA_SELECTED)) {
ED_area_tag_redraw(sa);
}
break;

View File

@@ -806,7 +806,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
BLI_uniquename(
&gpd->layers, gpl, "GP Layer", '.', offsetof(bGPDlayer, info), sizeof(gpl->info));
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, gpd);
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, gpd);
break;
}
case TSE_R_LAYER: {