diff --git a/src/Tools/BaseDraw.gd b/src/Tools/BaseDraw.gd index 5544679a46b..1bea35c0a40 100644 --- a/src/Tools/BaseDraw.gd +++ b/src/Tools/BaseDraw.gd @@ -273,6 +273,8 @@ func draw_tool(pos: Vector2i) -> void: func draw_end(pos: Vector2i) -> void: super.draw_end(pos) + _stroke_project = null + _stroke_images = [] _brush_size_dynamics = _brush_size if Tools.dynamics_size != Tools.Dynamics.NONE: _brush_size_dynamics = Tools.brush_size_min diff --git a/src/Tools/DesignTools/Eraser.gd b/src/Tools/DesignTools/Eraser.gd index d4d08fd372b..f2e99ac4578 100644 --- a/src/Tools/DesignTools/Eraser.gd +++ b/src/Tools/DesignTools/Eraser.gd @@ -92,8 +92,8 @@ func draw_move(pos_i: Vector2i) -> void: func draw_end(pos: Vector2i) -> void: pos = snap_position(pos) - super.draw_end(pos) if _picking_color: + super.draw_end(pos) return if _draw_line: @@ -105,6 +105,7 @@ func draw_end(pos: Vector2i) -> void: draw_fill_gap(_line_start, _line_end) _draw_line = false + super.draw_end(pos) commit_undo() SteamManager.set_achievement("ACH_ERASE_PIXEL") cursor_text = "" diff --git a/src/Tools/DesignTools/Pencil.gd b/src/Tools/DesignTools/Pencil.gd index d4b7f0d76b5..269503553cd 100644 --- a/src/Tools/DesignTools/Pencil.gd +++ b/src/Tools/DesignTools/Pencil.gd @@ -164,8 +164,8 @@ func draw_move(pos_i: Vector2i) -> void: func draw_end(pos: Vector2i) -> void: pos = snap_position(pos) - super.draw_end(pos) if _picking_color: + super.draw_end(pos) return if _draw_line: @@ -194,6 +194,7 @@ func draw_end(pos: Vector2i) -> void: draw_tool(v) _fill_inside_rect = Rect2i() + super.draw_end(pos) commit_undo() cursor_text = "" update_random_image() diff --git a/src/Tools/DesignTools/Shading.gd b/src/Tools/DesignTools/Shading.gd index 4dda20c0ea2..e18ce0615ef 100644 --- a/src/Tools/DesignTools/Shading.gd +++ b/src/Tools/DesignTools/Shading.gd @@ -291,8 +291,8 @@ func draw_move(pos_i: Vector2i) -> void: func draw_end(pos: Vector2i) -> void: pos = snap_position(pos) - super.draw_end(pos) if _picking_color: + super.draw_end(pos) return if _draw_line: @@ -304,6 +304,7 @@ func draw_end(pos: Vector2i) -> void: draw_fill_gap(_line_start, _line_end) _draw_line = false + super.draw_end(pos) commit_undo() cursor_text = "" update_random_image()