summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-05-23 16:20:52 +0200
committerGitHub <noreply@github.com>2021-05-23 16:20:52 +0200
commit587377e55360699c30633d54cb6ce330a365da39 (patch)
treee3f6118ac13a332adbd632404bca20a0c8f7879f /editor
parentf096a586d51ebcca467e608d62058047fd505e96 (diff)
parent0ac5be1e673836390c142ce16bccf49d04d337a9 (diff)
Merge pull request #48991 from KoBeWi/deferred_again
Reset Shader Editor scroll when changing shader
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/shader_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index ce12f19c59..a210a46127 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -63,6 +63,8 @@ void ShaderTextEditor::set_edited_shader(const Ref<Shader> &p_shader) {
get_text_editor()->set_text(p_shader->get_code());
get_text_editor()->clear_undo_history();
+ get_text_editor()->call_deferred("set_h_scroll", 0);
+ get_text_editor()->call_deferred("set_v_scroll", 0);
_validate_script();
_line_col_changed();