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

@ -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: