summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorGoral <pgoral@gmail.com>2019-05-08 18:49:49 +0200
committerGoral <pgoral@gmail.com>2019-05-29 22:27:16 +0200
commitaabd9980d17492224c6c221077fbae305d80cb0b (patch)
tree142b84e0dda2715fbe525cc85d87eef4b6b04d39 /editor/plugins
parentb96cd577c3022c8431c7911b24c9d294c7f9c8d9 (diff)
Changing method signature in other class in not recognized in working class in typed GDScript #28685
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.h2
-rw-r--r--editor/plugins/script_text_editor.cpp4
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/text_editor.cpp3
-rw-r--r--editor/plugins/text_editor.h2
6 files changed, 15 insertions, 0 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 92579e5cef..a774abf247 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -429,6 +429,8 @@ void ScriptEditor::_go_to_tab(int p_idx) {
if (script != NULL) {
notify_script_changed(script);
}
+
+ Object::cast_to<ScriptEditorBase>(c)->validate();
}
if (Object::cast_to<EditorHelp>(c)) {
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 683fa881f8..edea7e6322 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -116,6 +116,8 @@ public:
virtual Control *get_edit_menu() = 0;
virtual void clear_edit_menu() = 0;
+ virtual void validate() = 0;
+
ScriptEditorBase() {}
};
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index d40e67cc8c..80f4376bce 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1744,3 +1744,7 @@ void ScriptTextEditor::register_editor() {
ScriptEditor::register_create_script_editor_function(create_editor);
}
+
+void ScriptTextEditor::validate() {
+ this->code_editor->validate_script();
+}
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 0dbc884594..2985659feb 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -215,6 +215,8 @@ public:
virtual void clear_edit_menu();
static void register_editor();
+ virtual void validate();
+
ScriptTextEditor();
};
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index becaae3567..b3fdd4b7cd 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -622,3 +622,6 @@ TextEditor::TextEditor() {
code_editor->get_text_edit()->set_drag_forwarding(this);
}
+
+void TextEditor::validate() {
+}
diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h
index 767001e2f6..7d02379371 100644
--- a/editor/plugins/text_editor.h
+++ b/editor/plugins/text_editor.h
@@ -140,6 +140,8 @@ public:
virtual Control *get_edit_menu();
virtual void clear_edit_menu();
+ virtual void validate();
+
static void register_editor();
TextEditor();