diff --git a/src/UI/Dialogs/ExportDialog.gd b/src/UI/Dialogs/ExportDialog.gd index 463368383..0e0ad5047 100644 --- a/src/UI/Dialogs/ExportDialog.gd +++ b/src/UI/Dialogs/ExportDialog.gd @@ -366,9 +366,20 @@ func _on_FileLineEdit_text_changed(new_text: String) -> void: Global.current_project.file_name = new_text -func _on_FileDialog_dir_selected(dir: String) -> void: +func _on_path_dialog_dir_selected(dir: String) -> void: path_line_edit.text = dir Global.current_project.export_directory_path = dir + # Needed because if native file dialogs are enabled + # the export dialog closes when the path dialog closes + if not visible: + show() + + +func _on_path_dialog_canceled() -> void: + # Needed because if native file dialogs are enabled + # the export dialog closes when the path dialog closes + if not visible: + show() func _on_FileFormat_item_selected(idx: int) -> void: diff --git a/src/UI/Dialogs/ExportDialog.tscn b/src/UI/Dialogs/ExportDialog.tscn index 0c7073133..21129596d 100644 --- a/src/UI/Dialogs/ExportDialog.tscn +++ b/src/UI/Dialogs/ExportDialog.tscn @@ -357,7 +357,8 @@ size_flags_horizontal = 3 [connection signal="toggled" from="VBoxContainer/VSplitContainer/VBoxContainer/AdvancedOptions/GridContainer/SplitLayers" to="." method="_on_split_layers_toggled"] [connection signal="toggled" from="VBoxContainer/VSplitContainer/VBoxContainer/AdvancedOptions/GridContainer/IncludeTagsInFilename" to="." method="_on_IncludeTagsInFilename_toggled"] [connection signal="toggled" from="VBoxContainer/VSplitContainer/VBoxContainer/AdvancedOptions/GridContainer/MultipleAnimationsDirectories" to="." method="_on_MultipleAnimationsDirectories_toggled"] -[connection signal="dir_selected" from="PathDialog" to="." method="_on_FileDialog_dir_selected"] +[connection signal="canceled" from="PathDialog" to="." method="_on_path_dialog_canceled"] +[connection signal="dir_selected" from="PathDialog" to="." method="_on_path_dialog_dir_selected"] [connection signal="confirmed" from="FileExistsAlert" to="." method="_on_FileExistsAlert_confirmed"] [connection signal="custom_action" from="FileExistsAlert" to="." method="_on_FileExistsAlert_custom_action"] [connection signal="timeout" from="FrameTimer" to="." method="_on_FrameTimer_timeout"]