mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:44:42 -04:00
Imported image files now open in an new tab
Keep in mind that opening an image file as a new frame might not work properly yet, if the target image has a different size.
This commit is contained in:
parent
1b1c7f844f
commit
6d87901056
5 changed files with 59 additions and 64 deletions
|
@ -20,14 +20,14 @@ func open_pxo_file(path : String, untitled_backup : bool = false) -> void:
|
|||
var file := File.new()
|
||||
var err := file.open_compressed(path, File.READ, File.COMPRESSION_ZSTD)
|
||||
if err == ERR_FILE_UNRECOGNIZED:
|
||||
err = file.open(path, File.READ) # If the file is not compressed open it raw (pre-v0.7)
|
||||
err = file.open(path, File.READ) # If the file is not compressed open it raw (pre-v0.7)
|
||||
|
||||
if err != OK:
|
||||
Global.notification_label("File failed to open")
|
||||
file.close()
|
||||
return
|
||||
|
||||
var new_project := Project.new()
|
||||
var new_project := Project.new([], path.get_file())
|
||||
|
||||
var file_version := file.get_line() # Example, "v0.7.10-beta"
|
||||
var file_ver_splitted := file_version.split("-")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue