diff options
author | Yuri Rubinsky <chaosus89@gmail.com> | 2022-07-23 09:38:59 +0300 |
---|---|---|
committer | Yuri Rubinsky <chaosus89@gmail.com> | 2022-07-23 09:38:59 +0300 |
commit | 6d992abb541d4e772ef1fbc16d0b82ca3a6b343d (patch) | |
tree | c1b6dcbe8301cb5d1cc081ef6f5ef497bca6f774 /editor/plugins/shader_editor_plugin.cpp | |
parent | fe929d4787b2b11390891fb03da1dda78b18eb65 (diff) |
Fix some errors after shader preprocessor PR
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index e7e7751f3b..4af44da35b 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -381,7 +381,7 @@ void ShaderTextEditor::_validate_script() { //preprocessor error ERR_FAIL_COND(err_positions.size() == 0); - String error_text; + String error_text = error_pp; int error_line = err_positions.front()->get().line; if (err_positions.size() == 1) { // Error in main file @@ -1198,12 +1198,12 @@ void ShaderEditorPlugin::edit(Object *p_object) { Ref<VisualShader> vs = es.shader; if (vs.is_valid()) { es.visual_shader_editor = memnew(VisualShaderEditor); - es.visual_shader_editor->edit(vs.ptr()); shader_tabs->add_child(es.visual_shader_editor); + es.visual_shader_editor->edit(vs.ptr()); } else { es.shader_editor = memnew(ShaderEditor); - es.shader_editor->edit(s); shader_tabs->add_child(es.shader_editor); + es.shader_editor->edit(s); es.shader_editor->connect("validation_changed", callable_mp(this, &ShaderEditorPlugin::_update_shader_list_status)); } } |