Reset Shader Editor scroll when changing shader

(cherry picked from commit 0ac5be1e67)
This commit is contained in:
kobewi 2021-05-23 13:54:45 +02:00 committed by Rémi Verschelde
parent 0b136a8066
commit f78c276abe
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -55,6 +55,8 @@ void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
get_text_edit()->set_text(p_shader->get_code());
get_text_edit()->clear_undo_history();
get_text_edit()->call_deferred("set_h_scroll", 0);
get_text_edit()->call_deferred("set_v_scroll", 0);
_validate_script();
_line_col_changed();