Fix T62484: Mesh undo ignores selection mode

This commit is contained in:
Campbell Barton 2019-03-13 17:37:43 +11:00
parent 2bc6858021
commit e6371019e5
Notes: blender-bot 2023-02-14 05:28:01 +01:00
Referenced by issue #62484, Going from object mode to edit mode via "Undo" operation, the previousley vetex selection changes from vertices to edges.
1 changed files with 3 additions and 0 deletions

View File

@ -748,6 +748,9 @@ static void mesh_undosys_step_decode(struct bContext *C, struct Main *UNUSED(bma
/* The first element is always active */
ED_undo_object_set_active_or_warn(CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG);
Scene *scene = CTX_data_scene(C);
scene->toolsettings->selectmode = us->elems[0].data.selectmode;
WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL);
}