diff options
| author | Michael Alexsander <michaelalexsander@protonmail.com> | 2022-03-04 19:16:33 -0300 |
|---|---|---|
| committer | Michael Alexsander <michaelalexsander@protonmail.com> | 2022-03-04 19:16:33 -0300 |
| commit | 917dac78e76cba76165cca9b1c966e52fdd6ec3d (patch) | |
| tree | 982b03d1c823d9d3f4e0676bb941e82af7bb035c /editor/plugins/script_editor_plugin.cpp | |
| parent | 71835906dd3965eac703137bc8e14abcaa630dfd (diff) | |
| download | redot-engine-917dac78e76cba76165cca9b1c966e52fdd6ec3d.tar.gz | |
Replace some bits of code left to work with the new `TabContainer`
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index a4a2919034..827eeababf 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -810,7 +810,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save, bool p_history_back) { } if (idx >= 0) { if (history_pos >= 0) { - idx = history[history_pos].control->get_index(); + idx = tab_container->get_tab_idx_from_control(history[history_pos].control); } tab_container->set_current_tab(idx); } else { @@ -1429,7 +1429,7 @@ void ScriptEditor::_menu_option(int p_option) { file_system_dock->navigate_to_path(path); // Ensure that the FileSystem dock is visible. TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control(); - tab_container->set_current_tab(file_system_dock->get_index()); + tab_container->set_current_tab(tab_container->get_tab_idx_from_control(file_system_dock)); } } break; case CLOSE_DOCS: { @@ -3376,7 +3376,7 @@ void ScriptEditor::_update_history_pos(int p_new_pos) { } history_pos = p_new_pos; - tab_container->set_current_tab(history[history_pos].control->get_index()); + tab_container->set_current_tab(tab_container->get_tab_idx_from_control(history[history_pos].control)); n = history[history_pos].control; |
