Merge pull request #84064 from jsjtxietian/fix-save-in-text-shader-editor-pass-through

Add save shortcut for text shader editor to prevent it propagating to scene
This commit is contained in:
Rémi Verschelde 2023-10-28 18:35:21 +02:00
commit b096174259
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -614,8 +614,8 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_item(TTR("Load Shader File"), FILE_OPEN);
file_menu->get_popup()->add_item(TTR("Load Shader Include File"), FILE_OPEN_INCLUDE);
file_menu->get_popup()->add_item(TTR("Save File"), FILE_SAVE);
file_menu->get_popup()->add_item(TTR("Save File As"), FILE_SAVE_AS);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("shader_editor/save", TTR("Save File"), KeyModifierMask::CMD_OR_CTRL | Key::S), FILE_SAVE);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("shader_editor/save_as", TTR("Save File As"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::S), FILE_SAVE_AS);
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_item(TTR("Open File in Inspector"), FILE_INSPECT);
file_menu->get_popup()->add_separator();