From 2a189092108f4519b9012cfc0317f558c1e4795b Mon Sep 17 00:00:00 2001 From: llschuster Date: Wed, 12 May 2021 12:45:30 +0200 Subject: [PATCH] text-editor: fix Clicking warning doesn't center around line (cherry picked from commit 6b55ec2ca9a805bc2ae72038d2eaa24242cb4fea) --- editor/plugins/script_text_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 0d88c8c8582..c9ec0089ef5 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -388,7 +388,7 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) { 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()); + goto_line_centered(p_line.operator int64_t()); } else if (p_line.get_type() == Variant::DICTIONARY) { Dictionary meta = p_line.operator Dictionary(); code_editor->get_text_edit()->insert_at("# warning-ignore:" + meta["code"].operator String(), meta["line"].operator int64_t() - 1);