Fix T64300: Missing update of original data-block on redo

Dependency graph was not yet set as active when is used by
operator which is being redone.
This commit is contained in:
2019-05-17 18:59:29 +02:00
parent 0920cb650d
commit be5fd9c09f

View File

@@ -1312,7 +1312,13 @@ Depsgraph *CTX_data_depsgraph(const bContext *C)
{
Scene *scene = CTX_data_scene(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
return BKE_scene_get_depsgraph(scene, view_layer, true);
Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true);
/* Dependency graph might have been just allocated, and hence it will not be marked.
* This confuses redo system due to the lack of flushing changes back to the original data.
* In the future we would need to check whether the CTX_wm_window(C) is in editing mode (as an
* opposite of playback-preview-only) and set active flag based on that. */
DEG_make_active(depsgraph);
return depsgraph;
}
Depsgraph *CTX_data_evaluated_depsgraph(const bContext *C)