mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix wrong current directory of the open and save dialogs
Their current directory was one directory above of the directory it should be
This commit is contained in:
parent
3022963b84
commit
aa5c1d3182
11
src/Main.gd
11
src/Main.gd
|
@ -184,13 +184,6 @@ func _ready() -> void:
|
||||||
Import.import_patterns(Global.path_join_array(Global.data_directories, "Patterns"))
|
Import.import_patterns(Global.path_join_array(Global.data_directories, "Patterns"))
|
||||||
|
|
||||||
quit_and_save_dialog.add_button("Exit without saving", false, "ExitWithoutSaving")
|
quit_and_save_dialog.add_button("Exit without saving", false, "ExitWithoutSaving")
|
||||||
|
|
||||||
open_sprite_dialog.current_dir = Global.config_cache.get_value(
|
|
||||||
"data", "current_dir", OS.get_system_dir(OS.SYSTEM_DIR_DESKTOP)
|
|
||||||
)
|
|
||||||
save_sprite_dialog.current_dir = Global.config_cache.get_value(
|
|
||||||
"data", "current_dir", OS.get_system_dir(OS.SYSTEM_DIR_DESKTOP)
|
|
||||||
)
|
|
||||||
_handle_cmdline_arguments()
|
_handle_cmdline_arguments()
|
||||||
get_tree().root.files_dropped.connect(_on_files_dropped)
|
get_tree().root.files_dropped.connect(_on_files_dropped)
|
||||||
if OS.get_name() == "Android":
|
if OS.get_name() == "Android":
|
||||||
|
@ -215,8 +208,8 @@ func _input(event: InputEvent) -> void:
|
||||||
|
|
||||||
func _project_switched() -> void:
|
func _project_switched() -> void:
|
||||||
if Global.current_project.export_directory_path != "":
|
if Global.current_project.export_directory_path != "":
|
||||||
open_sprite_dialog.current_path = Global.current_project.export_directory_path
|
open_sprite_dialog.current_dir = Global.current_project.export_directory_path
|
||||||
save_sprite_dialog.current_path = Global.current_project.export_directory_path
|
save_sprite_dialog.current_dir = Global.current_project.export_directory_path
|
||||||
|
|
||||||
|
|
||||||
# Taken from https://github.com/godotengine/godot/blob/3.x/editor/editor_settings.cpp#L1474
|
# Taken from https://github.com/godotengine/godot/blob/3.x/editor/editor_settings.cpp#L1474
|
||||||
|
|
Loading…
Reference in a new issue