Changed CameraMovement.fit_to_frame() to get a Vector2 as an argument for the canvas size

This fixes the issue when importing an image, not as a new frame, that did not get fitted to frame.
This commit is contained in:
OverloadedOrama 2020-05-11 16:33:44 +03:00
parent 62a695366a
commit 358a95f709
3 changed files with 12 additions and 12 deletions

View file

@ -542,9 +542,9 @@ func camera_zoom() -> void:
Global.camera2.zoom_max = Vector2.ONE
Global.camera_preview.zoom_max = Vector2.ONE
Global.camera.fit_to_frame()
Global.camera2.fit_to_frame()
Global.camera_preview.fit_to_frame()
Global.camera.fit_to_frame(size)
Global.camera2.fit_to_frame(size)
Global.camera_preview.fit_to_frame(size)
Global.transparent_checker._ready() # To update the rect size