Add save shortcut for text shader editor to prevent it propagated to scene

when hit ctrl s in the shader editor
This commit is contained in:
jsjtxietian 2023-10-28 00:53:03 +08:00
parent ba79e53dd0
commit 775adc0a6d

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();