1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Fixes critical bug that is caused by removing a project tab that is to the left of the currently active tab

This commit is contained in:
Manolis Papadeas 2021-10-06 01:51:39 +03:00
parent da070db27e
commit 845bf2bab7

View file

@ -44,5 +44,8 @@ func delete_tab(tab : int) -> void:
Global.current_project_index -= 1
else:
Global.current_project_index = 0
else:
if tab < Global.current_project_index:
Global.current_project_index -= 1
if Global.unsaved_changes_dialog.is_connected("confirmed", self, "delete_tab"):
Global.unsaved_changes_dialog.disconnect("confirmed", self, "delete_tab")