mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Fix error when "Toggle Files Panel" in shader editor
This commit is contained in:
parent
53be3b78d1
commit
b9657ad198
1 changed files with 10 additions and 8 deletions
|
|
@ -633,7 +633,8 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
|
||||||
shader_list->set_visible(!shader_list->is_visible());
|
shader_list->set_visible(!shader_list->is_visible());
|
||||||
|
|
||||||
int index = shader_tabs->get_current_tab();
|
int index = shader_tabs->get_current_tab();
|
||||||
ERR_FAIL_INDEX(index, shader_tabs->get_tab_count());
|
if (index != -1) {
|
||||||
|
ERR_FAIL_INDEX(index, (int)edited_shaders.size());
|
||||||
TextShaderEditor *editor = Object::cast_to<TextShaderEditor>(edited_shaders[index].shader_editor);
|
TextShaderEditor *editor = Object::cast_to<TextShaderEditor>(edited_shaders[index].shader_editor);
|
||||||
if (editor) {
|
if (editor) {
|
||||||
editor->get_code_editor()->update_toggle_files_button();
|
editor->get_code_editor()->update_toggle_files_button();
|
||||||
|
|
@ -643,6 +644,7 @@ void ShaderEditorPlugin::_menu_item_pressed(int p_index) {
|
||||||
vs_editor->update_toggle_files_button();
|
vs_editor->update_toggle_files_button();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue