1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Automatically load an image as a new project, when there is only one empty project

This is also useful for the CLI
This commit is contained in:
Emmanouil Papadeas 2024-04-05 20:16:54 +03:00
parent 0ac7789bf9
commit 1062f88e4c

View file

@ -92,6 +92,9 @@ func add_import_option(import_name: StringName, import_scene: PackedScene) -> in
func handle_loading_image(file: String, image: Image) -> void:
if Global.projects.size() <= 1 and Global.current_project.is_empty():
open_image_as_new_tab(file, image)
return
var preview_dialog := preview_dialog_tscn.instantiate() as ImportPreviewDialog
# add custom importers to preview dialog
for import_name in custom_import_names.keys():