From 6a78351704c184695c6675a03fa51e318699693c Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 21 Dec 2021 01:26:58 +0200 Subject: [PATCH] Fix undoredo not working if the users draws on a locked/invisible layer --- src/Tools/Draw.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Tools/Draw.gd b/src/Tools/Draw.gd index 1b65fc800..a75571951 100644 --- a/src/Tools/Draw.gd +++ b/src/Tools/Draw.gd @@ -148,6 +148,8 @@ func update_line_polylines(start: Vector2, end: Vector2) -> void: func prepare_undo(action: String) -> void: var project: Project = Global.current_project + if !project.layers[project.current_layer].can_layer_get_drawn(): + return _undo_data = _get_undo_data() project.undo_redo.create_action(action)