diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-17 23:13:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 23:13:08 +0200 |
commit | 0ac3687d6fe3bfa90f5cfbdf7c28752de1b627f0 (patch) | |
tree | 22022175ddffa8140b268feae8ed4648223a7482 /editor | |
parent | d8d7222ffbb9732f09803dae476f93c48605b4bd (diff) | |
parent | aabd9980d17492224c6c221077fbae305d80cb0b (diff) |
Merge pull request #28766 from pgoral/editor_validation_issue
Changing method signature in other class in not recognized in working…
Diffstat (limited to 'editor')
-rw-r--r-- | editor/code_editor.cpp | 5 | ||||
-rw-r--r-- | editor/code_editor.h | 2 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/script_editor_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.h | 2 | ||||
-rw-r--r-- | editor/plugins/text_editor.cpp | 3 | ||||
-rw-r--r-- | editor/plugins/text_editor.h | 2 |
8 files changed, 21 insertions, 1 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 01773a0bcd..e471993fc7 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -1330,11 +1330,14 @@ void CodeTextEditor::_on_settings_change() { } void CodeTextEditor::_text_changed_idle_timeout() { - _validate_script(); emit_signal("validate_script"); } +void CodeTextEditor::validate_script() { + idle->start(); +} + void CodeTextEditor::_warning_label_gui_input(const Ref<InputEvent> &p_event) { Ref<InputEventMouseButton> mb = p_event; if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) { diff --git a/editor/code_editor.h b/editor/code_editor.h index cf97f30b72..0ef8ec7061 100644 --- a/editor/code_editor.h +++ b/editor/code_editor.h @@ -242,6 +242,8 @@ public: void set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud); + void validate_script(); + CodeTextEditor(); }; diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 1610e5d3d7..df9ce73914 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -437,6 +437,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 7cd347e2d0..549af1ca31 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -117,6 +117,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 c7a438948d..ce0859a1f6 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1810,3 +1810,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 7f5b6c065d..24d40a5eec 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -220,6 +220,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 d036d7e965..eeef3397d2 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -654,3 +654,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 e06d816177..e91909e0ea 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -145,6 +145,8 @@ public: virtual Control *get_edit_menu(); virtual void clear_edit_menu(); + virtual void validate(); + static void register_editor(); TextEditor(); |