summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-21 10:14:04 +0100
committerGitHub <noreply@github.com>2018-12-21 10:14:04 +0100
commitbe8c0d57c565bae9ce4fae140355d9e886c8443b (patch)
tree8145a47e7392f8452e78e2edfbe3dc147a0e54fd /editor/plugins
parentbeccbe1efbf6919e0981fedbca1b7974ca4a4ca8 (diff)
parent260b5818f1cee46e1332b620bf9aaba821d7a025 (diff)
Merge pull request #24519 from Chaosus/error_label_fix
Change LinkLabel back to Label in error status bar
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/script_text_editor.cpp9
-rw-r--r--editor/plugins/script_text_editor.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 85237f64d9..f6ec217ce0 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -280,6 +280,13 @@ void ScriptTextEditor::_toggle_warning_pannel(const Ref<InputEvent> &p_event) {
}
}
+void ScriptTextEditor::_error_pressed(const Ref<InputEvent> &p_event) {
+ Ref<InputEventMouseButton> mb = p_event;
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+ code_editor->goto_error();
+ }
+}
+
void ScriptTextEditor::_warning_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
code_editor->get_text_edit()->cursor_set_line(p_line.operator int64_t());
@@ -1101,6 +1108,7 @@ void ScriptTextEditor::_bind_methods() {
ClassDB::bind_method("_lookup_symbol", &ScriptTextEditor::_lookup_symbol);
ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input);
ClassDB::bind_method("_toggle_warning_pannel", &ScriptTextEditor::_toggle_warning_pannel);
+ ClassDB::bind_method("_error_pressed", &ScriptTextEditor::_error_pressed);
ClassDB::bind_method("_warning_clicked", &ScriptTextEditor::_warning_clicked);
ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
@@ -1437,6 +1445,7 @@ ScriptTextEditor::ScriptTextEditor() {
warnings_panel->set_focus_mode(FOCUS_CLICK);
warnings_panel->hide();
+ code_editor->get_error_label()->connect("gui_input", this, "_error_pressed");
code_editor->get_warning_label()->connect("gui_input", this, "_toggle_warning_pannel");
code_editor->get_warning_count_label()->connect("gui_input", this, "_toggle_warning_pannel");
warnings_panel->connect("meta_clicked", this, "_warning_clicked");
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index 837201a947..7a9d531e1c 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -126,6 +126,7 @@ protected:
void _load_theme_settings();
void _set_theme_for_script();
void _toggle_warning_pannel(const Ref<InputEvent> &p_event);
+ void _error_pressed(const Ref<InputEvent> &p_event);
void _warning_clicked(Variant p_line);
void _notification(int p_what);