mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix another bug with Undo/Redo where the app became unresponsive if the user drew outside the canvas
This commit is contained in:
parent
aac30d9c76
commit
93268fef43
|
@ -90,8 +90,8 @@ func draw_end(position: Vector2) -> void:
|
||||||
draw_tool(_line_start)
|
draw_tool(_line_start)
|
||||||
draw_fill_gap(_line_start, _line_end)
|
draw_fill_gap(_line_start, _line_end)
|
||||||
_draw_line = false
|
_draw_line = false
|
||||||
if _changed or _drawer.color_op.changed:
|
|
||||||
commit_undo()
|
commit_undo()
|
||||||
cursor_text = ""
|
cursor_text = ""
|
||||||
update_random_image()
|
update_random_image()
|
||||||
|
|
||||||
|
|
|
@ -143,8 +143,8 @@ func draw_end(position: Vector2) -> void:
|
||||||
v.y = y
|
v.y = y
|
||||||
if Geometry.is_point_in_polygon(v, _draw_points):
|
if Geometry.is_point_in_polygon(v, _draw_points):
|
||||||
draw_tool(v)
|
draw_tool(v)
|
||||||
if _changed or _drawer.color_op.changed:
|
|
||||||
commit_undo()
|
commit_undo()
|
||||||
cursor_text = ""
|
cursor_text = ""
|
||||||
update_random_image()
|
update_random_image()
|
||||||
|
|
||||||
|
|
|
@ -265,8 +265,8 @@ func draw_end(position: Vector2) -> void:
|
||||||
draw_tool(_line_start)
|
draw_tool(_line_start)
|
||||||
draw_fill_gap(_line_start, _line_end)
|
draw_fill_gap(_line_start, _line_end)
|
||||||
_draw_line = false
|
_draw_line = false
|
||||||
if _changed or _drawer.color_op.changed:
|
|
||||||
commit_undo()
|
commit_undo()
|
||||||
cursor_text = ""
|
cursor_text = ""
|
||||||
update_random_image()
|
update_random_image()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue