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:
parent
8142647a69
commit
28818171d4
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue