Canvas background gets resized on frame_changed

In case frames have different sizes. Also solved issue when opening files and they had a different size than the currently selected image.
This commit is contained in:
OverloadedOrama 2020-04-21 04:29:39 +03:00
parent da62d54a62
commit c737ff3589
2 changed files with 3 additions and 0 deletions

View file

@ -660,6 +660,8 @@ func frame_changed(value : int) -> void:
if current_frame < layers[current_layer][3].get_child_count(): if current_frame < layers[current_layer][3].get_child_count():
layers[current_layer][3].get_child(current_frame).pressed = true layers[current_layer][3].get_child(current_frame).pressed = true
Global.transparent_checker._ready() # To update the rect size
func layer_changed(value : int) -> void: func layer_changed(value : int) -> void:
current_layer = value current_layer = value

View file

@ -2,6 +2,7 @@ extends Node
var current_save_path := "" var current_save_path := ""
func open_pxo_file(path : String) -> void: func open_pxo_file(path : String) -> void:
var file := File.new() var file := File.new()
var err := file.open_compressed(path, File.READ, File.COMPRESSION_ZSTD) var err := file.open_compressed(path, File.READ, File.COMPRESSION_ZSTD)