From bd7f0c2dfdf023d4dc37c12c92a7c264c07295e0 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 18 Nov 2022 14:12:09 +0100 Subject: [PATCH] Don't erase the last cut data from the pastecut tool when switching from it. --- game/PaintCanvas.gd | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/game/PaintCanvas.gd b/game/PaintCanvas.gd index 657587c..fc3a955 100644 --- a/game/PaintCanvas.gd +++ b/game/PaintCanvas.gd @@ -318,12 +318,9 @@ func _on_tool_changed() -> void: if _current_action: _current_action = null return - + if get_previous_tool() == TOOL_CUT: clear_preview() - elif get_previous_tool() == TOOL_PASTECUT: - _selection_cells.resize(0); - _selection_colors.resize(0); _current_action = get_action() @@ -335,7 +332,6 @@ func tool_process(local_position : Vector2, event: InputEvent) -> void: _current_action = get_action() if current_tool == TOOL_PENCIL || current_tool == TOOL_LINE || current_tool == TOOL_RECT: - var arr : Array = Array() arr.push_back(cell_mouse_position) @@ -348,7 +344,6 @@ func tool_process(local_position : Vector2, event: InputEvent) -> void: do_action(arr) elif current_tool == TOOL_DARKEN || current_tool == TOOL_BRIGHTEN || current_tool == TOOL_CUT: - var arr : Array = Array() arr.push_back(cell_mouse_position)