Merge pull request #28766 from pgoral/editor_validation_issue
Changing method signature in other class in not recognized in working…
This commit is contained in:
commit
0ac3687d6f
10 changed files with 25 additions and 1 deletions
|
@ -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) {
|
||||
|
|
|
@ -242,6 +242,8 @@ public:
|
|||
|
||||
void set_code_complete_func(CodeTextEditorCodeCompleteFunc p_code_complete_func, void *p_ud);
|
||||
|
||||
void validate_script();
|
||||
|
||||
CodeTextEditor();
|
||||
};
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
||||
|
|
|
@ -117,6 +117,8 @@ public:
|
|||
virtual Control *get_edit_menu() = 0;
|
||||
virtual void clear_edit_menu() = 0;
|
||||
|
||||
virtual void validate() = 0;
|
||||
|
||||
ScriptEditorBase() {}
|
||||
};
|
||||
|
||||
|
|
|
@ -1810,3 +1810,7 @@ void ScriptTextEditor::register_editor() {
|
|||
|
||||
ScriptEditor::register_create_script_editor_function(create_editor);
|
||||
}
|
||||
|
||||
void ScriptTextEditor::validate() {
|
||||
this->code_editor->validate_script();
|
||||
}
|
||||
|
|
|
@ -220,6 +220,8 @@ public:
|
|||
virtual void clear_edit_menu();
|
||||
static void register_editor();
|
||||
|
||||
virtual void validate();
|
||||
|
||||
ScriptTextEditor();
|
||||
};
|
||||
|
||||
|
|
|
@ -654,3 +654,6 @@ TextEditor::TextEditor() {
|
|||
|
||||
code_editor->get_text_edit()->set_drag_forwarding(this);
|
||||
}
|
||||
|
||||
void TextEditor::validate() {
|
||||
}
|
||||
|
|
|
@ -145,6 +145,8 @@ public:
|
|||
virtual Control *get_edit_menu();
|
||||
virtual void clear_edit_menu();
|
||||
|
||||
virtual void validate();
|
||||
|
||||
static void register_editor();
|
||||
|
||||
TextEditor();
|
||||
|
|
|
@ -3759,4 +3759,7 @@ void _VisualScriptEditor::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("remove_custom_node", "name", "category"), &_VisualScriptEditor::remove_custom_node);
|
||||
ADD_SIGNAL(MethodInfo("custom_nodes_updated"));
|
||||
}
|
||||
|
||||
void VisualScriptEditor::validate() {
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -281,6 +281,7 @@ public:
|
|||
virtual Control *get_edit_menu();
|
||||
virtual void clear_edit_menu();
|
||||
virtual bool can_lose_focus_on_node_selection() { return false; }
|
||||
virtual void validate();
|
||||
|
||||
static void register_editor();
|
||||
|
||||
|
|
Loading…
Reference in a new issue