Change paths in the open/save dialogs when switching project

This commit is contained in:
OverloadedOrama 2020-06-09 20:19:55 +03:00
parent 58bab65518
commit 76af8a3214
2 changed files with 12 additions and 0 deletions

View file

@ -135,6 +135,14 @@ func change_project() -> void:
if has_changed:
Global.window_title = Global.window_title + "(*)"
var save_path = OpenSave.current_save_paths[Global.current_project_index]
if save_path != "":
Global.open_sprites_dialog.current_path = save_path
Global.save_sprites_dialog.current_path = save_path
Global.control.file_menu.set_item_text(3, tr("Save") + " %s" % save_path.get_file())
else:
Global.control.file_menu.set_item_text(3, tr("Save"))
func name_changed(value : String) -> void:
name = value