mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 10:44:26 +00:00
Center script line when double clicked on error in debugger
This commit is contained in:
parent
4d6ad16ac4
commit
0f14489ecb
6 changed files with 17 additions and 1 deletions
|
|
@ -306,8 +306,11 @@ void ScriptEditor::_goto_script_line(REF p_script, int p_line) {
|
|||
editor->push_item(p_script.ptr());
|
||||
|
||||
ScriptEditorBase *current = _get_current_editor();
|
||||
if (current)
|
||||
if (ScriptTextEditor *script_text_editor = Object::cast_to<ScriptTextEditor>(current)) {
|
||||
script_text_editor->goto_line_centered(p_line);
|
||||
} else if (current) {
|
||||
current->goto_line(p_line, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue