diff options
author | Dawid Wdowiak <dwdw9@wp.pl> | 2019-01-04 13:09:01 +0100 |
---|---|---|
committer | Dawid Wdowiak <dawidwdowiak@hotmail.com> | 2019-06-23 15:58:07 +0200 |
commit | 0f14489ecb29519b269cba178f23b6b727fd6445 (patch) | |
tree | 3ce779af059ae53e9486ee49934b0ae947b82b80 /editor/plugins/script_editor_plugin.cpp | |
parent | 4d6ad16ac4e07ab0e65a75262b2d7ccd1913c844 (diff) | |
download | redot-engine-0f14489ecb29519b269cba178f23b6b727fd6445.tar.gz |
Center script line when double clicked on error in debugger
Diffstat (limited to 'editor/plugins/script_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/script_editor_plugin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index d5e21321c3..1b00889e9a 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -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); + } } } } |