Skip to content

Commit 83c6da4

Browse files
committed
Merge pull request #112322 from YeldhamDev/hidden_bugs_i_will_tell_ya
Fix visual shader items not applying the correct theme components
2 parents 0fdbf05 + e0cb03a commit 83c6da4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editor/shader/shader_editor_plugin.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ void ShaderEditorPlugin::edit(Object *p_object) {
174174
} else {
175175
es.shader_editor = memnew(TextShaderEditor);
176176
}
177-
es.shader_editor->edit_shader(es.shader);
177+
// Needs to be deferred so it's called after entering the scene tree,
178+
// otherwise it won't be able to correctly fetch the editor theme.
179+
callable_mp(es.shader_editor, &ShaderEditor::edit_shader).call_deferred(es.shader);
178180
}
179181

180182
// TextShaderEditor-specific setup code.

0 commit comments

Comments
 (0)