You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #107534 from beicause/fix-editing-shader-include-open
Fix editing `ShaderInclude` causes a `Shader` to be edited
This commit is contained in:
@@ -382,6 +382,13 @@ void ShaderEditorPlugin::_shader_selected(int p_index) {
|
|||||||
|
|
||||||
shader_tabs->set_current_tab(p_index);
|
shader_tabs->set_current_tab(p_index);
|
||||||
shader_list->select(p_index);
|
shader_list->select(p_index);
|
||||||
|
|
||||||
|
// Avoid `Shader` being edited when editing `ShaderInclude` due to inspector refreshing.
|
||||||
|
if (edited_shaders[p_index].shader.is_valid()) {
|
||||||
|
EditorNode::get_singleton()->push_item_no_inspector(edited_shaders[p_index].shader.ptr());
|
||||||
|
} else {
|
||||||
|
EditorNode::get_singleton()->push_item_no_inspector(edited_shaders[p_index].shader_inc.ptr());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderEditorPlugin::_shader_list_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index) {
|
void ShaderEditorPlugin::_shader_list_clicked(int p_item, Vector2 p_local_mouse_pos, MouseButton p_mouse_button_index) {
|
||||||
|
|||||||
Reference in New Issue
Block a user