From 563edced5e4f70b148856d2510e5d912a156e9d5 Mon Sep 17 00:00:00 2001 From: Variable <77773850+Variable-ind@users.noreply.github.com> Date: Thu, 6 Feb 2025 04:56:33 +0500 Subject: [PATCH] Fix always_on_top for sub-dialogs (#1167) * Fix Create Folder sub-dialog of Export > Browse being always behind (thus making it unusable) * Add a dedicated tag (makes it easier to remove it if godot itself fixes this bug later), save and save as dialog are fixed * the scenes themselves have the tag instead of in Main.tscn * Fix browse->new folder of export dialog * fix a typo * Restore lines that were unintentionally changed by Godot * simplify the code and move it to the Export Dialog * fix artefacts of moving the code --- src/UI/Dialogs/ExportDialog.gd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/UI/Dialogs/ExportDialog.gd b/src/UI/Dialogs/ExportDialog.gd index c6f27be69..a0f8ace79 100644 --- a/src/UI/Dialogs/ExportDialog.gd +++ b/src/UI/Dialogs/ExportDialog.gd @@ -63,6 +63,11 @@ func _ready() -> void: else: file_exists_alert_popup.add_button("Cancel Export", false, "cancel") + # TODO: Remove the loop when https://github.com/godotengine/godot/issues/92848 gets fixed. + for dialog_child in path_dialog_popup.get_children(true): + if dialog_child is Window: + dialog_child.always_on_top = path_dialog_popup.always_on_top + func show_tab() -> void: get_tree().call_group("ExportImageOptions", "hide")