From 708d8250011dad02fd7d3651eb057bdd9e52fb7f Mon Sep 17 00:00:00 2001 From: Jakub Grzesik Date: Thu, 6 Jul 2017 09:18:20 +0200 Subject: Make available more informations about editor for Tool Plugins --- editor/plugins/script_editor_plugin.cpp | 61 ++++++++++++++++++++++++++++++++- editor/plugins/script_editor_plugin.h | 7 ++++ 2 files changed, 67 insertions(+), 1 deletion(-) (limited to 'editor/plugins') diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index dc2eddda3..b28b559b7 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -405,6 +405,8 @@ void ScriptEditor::_go_to_tab(int p_idx) { script_icon->set_texture(c->cast_to()->get_icon()); if (is_visible_in_tree()) c->cast_to()->ensure_focus(); + + notify_script_changed(c->cast_to()->get_edited_script()); } if (c->cast_to()) { @@ -510,7 +512,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) { apply_scripts(); } current->clear_edit_menu(); - + notify_script_close(current->get_edited_script()); } else { EditorHelp *help = tab_container->get_child(selected)->cast_to(); _add_recent_script(help->get_class()); @@ -777,6 +779,31 @@ void ScriptEditor::_file_dialog_action(String p_file) { file_dialog_option = -1; } +Ref