mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
Merge pull request #93385 from Chaosus/vs_fix_updating
Fix visual shader not being updated when switching tabs
This commit is contained in:
commit
acb9a4e6ad
@ -365,6 +365,11 @@ void ShaderEditorPlugin::_shader_selected(int p_index) {
|
||||
if (edited_shaders[p_index].shader_editor) {
|
||||
edited_shaders[p_index].shader_editor->validate_script();
|
||||
}
|
||||
|
||||
if (edited_shaders[p_index].visual_shader_editor) {
|
||||
edited_shaders[p_index].visual_shader_editor->validate_script();
|
||||
}
|
||||
|
||||
shader_tabs->set_current_tab(p_index);
|
||||
shader_list->select(p_index);
|
||||
}
|
||||
|
@ -1545,6 +1545,12 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
|
||||
}
|
||||
}
|
||||
|
||||
void VisualShaderEditor::validate_script() {
|
||||
if (visual_shader.is_valid()) {
|
||||
_update_nodes();
|
||||
}
|
||||
}
|
||||
|
||||
void VisualShaderEditor::add_plugin(const Ref<VisualShaderNodePlugin> &p_plugin) {
|
||||
if (plugins.has(p_plugin)) {
|
||||
return;
|
||||
|
@ -612,6 +612,8 @@ public:
|
||||
void edit(VisualShader *p_visual_shader);
|
||||
Ref<VisualShader> get_visual_shader() const { return visual_shader; }
|
||||
|
||||
void validate_script();
|
||||
|
||||
VisualShaderEditor();
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user