Fix #129798: GPv3: Selection to Cursor/Grid missing immediate update
Missing in db1443249c.
Need to tag positions as changed.
Also send `ND_DRAW` notifier to be sure we fully redraw (makes e.g.
gizmos update accordingly as well).
Pull Request: https://projects.blender.org/blender/blender/pulls/129848
This commit is contained in:
committed by
Falk David
parent
74f98b1e92
commit
a3b04dffbc
@@ -2996,9 +2996,11 @@ static int grease_pencil_snap_to_grid_exec(bContext *C, wmOperator * /*op*/)
|
||||
positions[point_i] = math::transform_point(world_to_layer, pos_snapped);
|
||||
});
|
||||
|
||||
drawing_info.drawing.tag_positions_changed();
|
||||
DEG_id_tag_update(&grease_pencil.id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&object.id, ID_RECALC_SYNC_TO_EVAL);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, &grease_pencil);
|
||||
}
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -3072,9 +3074,11 @@ static int grease_pencil_snap_to_cursor_exec(bContext *C, wmOperator *op)
|
||||
index_mask::masked_fill(positions, cursor_layer, selected_points);
|
||||
}
|
||||
|
||||
drawing_info.drawing.tag_positions_changed();
|
||||
DEG_id_tag_update(&grease_pencil.id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&object.id, ID_RECALC_SYNC_TO_EVAL);
|
||||
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, &grease_pencil);
|
||||
}
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
Reference in New Issue
Block a user