summaryrefslogtreecommitdiffstats
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-07-19 09:54:02 +0200
committerGitHub <noreply@github.com>2017-07-19 09:54:02 +0200
commitd4c73ea2b379835e75e02b78073547960cf03a74 (patch)
tree1496863e3d9a7d9e0e6bf7a0683a9b49695a9f92 /editor/editor_node.cpp
parent9cf72d0ae174badab07b1461f576955725375046 (diff)
parent708d8250011dad02fd7d3651eb057bdd9e52fb7f (diff)
downloadredot-engine-d4c73ea2b379835e75e02b78073547960cf03a74.tar.gz
Merge pull request #9565 from kubecz3k/tool-signals
Make more informations available for Tool Plugins about the editor
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f6a7aeff06..79c7aa044c 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -1575,6 +1575,11 @@ void EditorNode::_edit_current() {
editor_plugin_screen->make_visible(true);
+ int plugin_count = editor_data.get_editor_plugin_count();
+ for (int i = 0; i < plugin_count; i++) {
+ editor_data.get_editor_plugin(i)->notify_main_screen_changed(editor_plugin_screen->get_name());
+ }
+
for (int i = 0; i < editor_table.size(); i++) {
main_editor_buttons[i]->set_pressed(editor_table[i] == main_plugin);
@@ -2865,6 +2870,11 @@ void EditorNode::_editor_select(int p_which) {
editor_plugin_screen->make_visible(true);
editor_plugin_screen->selected_notify();
+ int plugin_count = editor_data.get_editor_plugin_count();
+ for (int i = 0; i < plugin_count; i++) {
+ editor_data.get_editor_plugin(i)->notify_main_screen_changed(editor_plugin_screen->get_name());
+ }
+
if (EditorSettings::get_singleton()->get("interface/separate_distraction_mode")) {
if (p_which == EDITOR_SCRIPT) {
set_distraction_free_mode(script_distraction);
@@ -3746,6 +3756,7 @@ void EditorNode::register_editor_types() {
ClassDB::register_class<EditorResourcePreviewGenerator>();
ClassDB::register_class<EditorFileSystem>();
ClassDB::register_class<EditorFileSystemDirectory>();
+ ClassDB::register_virtual_class<ScriptEditor>();
//ClassDB::register_type<EditorImporter>();
//ClassDB::register_type<EditorPostImport>();