mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:54:44 -04:00
Don't execute Canvas' _input() method if it's not the selected frame
Canvas.gd's _input() method returns when the canvas' frame is not the currently selected frame. Saves a little bit of performance and fixes some issues like the line angles of ALL frames being drawn, and might fix some crashes I had with motion drawing and undo/redoing.
This commit is contained in:
parent
bac3fdcad6
commit
1353db92d1
2 changed files with 31 additions and 28 deletions
|
@ -463,6 +463,8 @@ func frame_changed(value : int) -> void:
|
|||
|
||||
for c in canvases:
|
||||
c.visible = false
|
||||
c.is_making_line = false
|
||||
c.line_2d.set_point_position(1, c.line_2d.points[0])
|
||||
canvas = canvases[current_frame]
|
||||
canvas.visible = true
|
||||
canvas.generate_layer_panels()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue