mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
fix recent projects (#755)
This commit is contained in:
parent
950a6d77af
commit
56a113d36d
|
@ -748,7 +748,7 @@ func save_project_to_recent_list(path: String) -> void:
|
|||
return
|
||||
|
||||
if top_menu_container.recent_projects.has(path):
|
||||
return
|
||||
top_menu_container.recent_projects.erase(path)
|
||||
|
||||
if top_menu_container.recent_projects.size() >= 5:
|
||||
top_menu_container.recent_projects.pop_front()
|
||||
|
|
|
@ -82,7 +82,9 @@ func _setup_recent_projects_submenu(item: String) -> void:
|
|||
|
||||
|
||||
func update_recent_projects_submenu() -> void:
|
||||
for project in recent_projects:
|
||||
var reversed_recent_projects = recent_projects.duplicate()
|
||||
reversed_recent_projects.invert()
|
||||
for project in reversed_recent_projects:
|
||||
recent_projects_submenu.add_item(project.get_file())
|
||||
|
||||
|
||||
|
@ -394,7 +396,9 @@ func _export_file() -> void:
|
|||
|
||||
|
||||
func _on_recent_projects_submenu_id_pressed(id: int) -> void:
|
||||
Global.control.load_recent_project_file(recent_projects[id])
|
||||
var reversed_recent_projects = recent_projects.duplicate()
|
||||
reversed_recent_projects.invert()
|
||||
Global.control.load_recent_project_file(reversed_recent_projects[id])
|
||||
|
||||
|
||||
func edit_menu_id_pressed(id: int) -> void:
|
||||
|
|
Loading…
Reference in a new issue