Center script line when double clicked on error in debugger

This commit is contained in:
Dawid Wdowiak authored and Dawid Wdowiak committed 2019-06-23 15:58:07 +02:00
1 parent 4d6ad16ac4
commit 0f14489ecb
6 files changed
+17 -1

No files matched your search

+4 -1
View File
@@ -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);
}
}
}
}