From 3d5162040896d7c85fa6cb04edf35e697217090d Mon Sep 17 00:00:00 2001 From: teebarjunk Date: Wed, 13 Oct 2021 13:55:07 -0400 Subject: [PATCH] checks fix --- addons/text_editor/TE_TextEditor.gd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/text_editor/TE_TextEditor.gd b/addons/text_editor/TE_TextEditor.gd index 83b4590..4c2e564 100644 --- a/addons/text_editor/TE_TextEditor.gd +++ b/addons/text_editor/TE_TextEditor.gd @@ -142,8 +142,6 @@ func _ready(): popup_view_dir.add_check_item(".git/", hash(".git/")) popup_view_dir.add_check_item(".trash/", hash(".trash/")) - update_checks() - popup_view.add_child(popup_view_dir) popup_view.add_submenu_item("Directories", "Directories") _e = popup_view_dir.connect("index_pressed", self, "_menu_view_dir") @@ -169,6 +167,8 @@ func _ready(): popup_view_file.add_check_item("*." + ext, id) popup_view_file.set_item_checked(id, false) + update_checks() + popup_view.add_child(popup_view_file) popup_view.add_submenu_item("Files", "Files") _e = popup_view_file.connect("index_pressed", self, "_menu_view_file") @@ -249,8 +249,9 @@ func load_state(): tab.set_state(state.tabs[file_path]) if file_path == state.selected: selected = tab - - tab_parent.current_tab = selected.get_index() + + if selected: + tab_parent.current_tab = selected.get_index() current_directory = state.get("current_directory", current_directory)