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:
OverloadedOrama 2020-01-15 22:47:56 +02:00
parent bac3fdcad6
commit 1353db92d1
2 changed files with 31 additions and 28 deletions

View file

@ -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()