diff options
author | Anutrix <numaanzaheerahmed@yahoo.com> | 2022-09-30 20:50:51 +0530 |
---|---|---|
committer | Anutrix <numaanzaheerahmed@yahoo.com> | 2022-10-01 00:33:13 +0530 |
commit | 119e1a29373e71017d446331870957e735e31483 (patch) | |
tree | 39c097ad01398780ae6a541c0717e8d5efd56ecb /editor/plugins/shader_editor_plugin.cpp | |
parent | 166df0896c4e601c58f7261145afba5ee4a088a5 (diff) |
Fixed shader editor when no files are currently in shader list
Diffstat (limited to 'editor/plugins/shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/shader_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index 2eafa4fc91..ee3f43009f 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -1241,7 +1241,7 @@ void ShaderEditorPlugin::_update_shader_list() { shader_list->select(shader_tabs->get_current_tab()); } - for (int i = 1; i < FILE_MAX; i++) { + for (int i = FILE_SAVE; i < FILE_MAX; i++) { file_menu->get_popup()->set_item_disabled(file_menu->get_popup()->get_item_index(i), edited_shaders.size() == 0); } @@ -1592,7 +1592,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() { file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed)); file_hb->add_child(file_menu); - for (int i = 2; i < FILE_MAX; i++) { + for (int i = FILE_SAVE; i < FILE_MAX; i++) { file_menu->get_popup()->set_item_disabled(file_menu->get_popup()->get_item_index(i), true); } |