Fix: new Grease Pencil layer not selected when added from the viewport

When adding a new layer from the viewport, the newly created layer
is set as active, which is visible in the properties panel,
but the selection in the dopesheet was not updated accordingly,
due to a missing notifier which is added in this patch.
This commit is contained in:
Amélie Fondevilla 2023-01-10 14:18:09 +01:00
parent 597aecc016
commit fddb76e9af
Notes: blender-bot 2023-02-14 10:37:49 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #102967, 3.4: Potential candidates for corrective releases
1 changed files with 1 additions and 0 deletions

View File

@ -247,6 +247,7 @@ static int gpencil_layer_add_exec(bContext *C, wmOperator *op)
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
}
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}