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

Call Global.dialog_open when a PreviewDialog pops up/gets hidden

This commit is contained in:
OverloadedOrama 2020-06-17 02:58:24 +03:00
parent 8142647a69
commit 28818171d4
2 changed files with 6 additions and 0 deletions

View file

@ -36,6 +36,7 @@ func handle_loading_files(files : PoolStringArray) -> void:
preview_dialog.image = image
Global.control.add_child(preview_dialog)
preview_dialog.popup_centered()
Global.dialog_open(true)
func open_pxo_file(path : String, untitled_backup : bool = false) -> void:

View file

@ -21,6 +21,11 @@ func _on_PreviewDialog_about_to_show() -> void:
func _on_PreviewDialog_popup_hide() -> void:
queue_free()
# Call Global.dialog_open() only if it's the only preview dialog opened
for child in Global.control.get_children():
if child != self and "PreviewDialog" in child.name:
return
Global.dialog_open(false)
func _on_PreviewDialog_confirmed() -> void: