mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 18:11:13 +00:00
text-editor: fix Clicking warning doesn't center around line
This commit is contained in:
parent
de3747fc37
commit
6b55ec2ca9
1 changed files with 1 additions and 1 deletions
|
|
@ -292,7 +292,7 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) {
|
||||||
|
|
||||||
void ScriptTextEditor::_warning_clicked(Variant p_line) {
|
void ScriptTextEditor::_warning_clicked(Variant p_line) {
|
||||||
if (p_line.get_type() == Variant::INT) {
|
if (p_line.get_type() == Variant::INT) {
|
||||||
code_editor->get_text_editor()->cursor_set_line(p_line.operator int64_t());
|
goto_line_centered(p_line.operator int64_t());
|
||||||
} else if (p_line.get_type() == Variant::DICTIONARY) {
|
} else if (p_line.get_type() == Variant::DICTIONARY) {
|
||||||
Dictionary meta = p_line.operator Dictionary();
|
Dictionary meta = p_line.operator Dictionary();
|
||||||
code_editor->get_text_editor()->insert_at("# warning-ignore:" + meta["code"].operator String(), meta["line"].operator int64_t() - 1);
|
code_editor->get_text_editor()->insert_at("# warning-ignore:" + meta["code"].operator String(), meta["line"].operator int64_t() - 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue