Merge pull request #71057 from EricEzaM/editor-node-cleanup
Remove unnecessary changing of shortcut name in editor node.
This commit is contained in:
commit
56522f7f8f
@ -3251,11 +3251,6 @@ void EditorNode::_discard_changes(const String &p_str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EditorNode::_update_file_menu_opened() {
|
void EditorNode::_update_file_menu_opened() {
|
||||||
Ref<Shortcut> close_scene_sc = ED_GET_SHORTCUT("editor/close_scene");
|
|
||||||
close_scene_sc->set_name(TTR("Close Scene"));
|
|
||||||
Ref<Shortcut> reopen_closed_scene_sc = ED_GET_SHORTCUT("editor/reopen_closed_scene");
|
|
||||||
reopen_closed_scene_sc->set_name(TTR("Reopen Closed Scene"));
|
|
||||||
|
|
||||||
file_menu->set_item_disabled(file_menu->get_item_index(FILE_OPEN_PREV), previous_scenes.is_empty());
|
file_menu->set_item_disabled(file_menu->get_item_index(FILE_OPEN_PREV), previous_scenes.is_empty());
|
||||||
_update_undo_redo_allowed();
|
_update_undo_redo_allowed();
|
||||||
}
|
}
|
||||||
@ -5284,12 +5279,10 @@ void EditorNode::_scene_tab_input(const Ref<InputEvent> &p_input) {
|
|||||||
scene_tabs_context_menu->add_item(TTR("Play This Scene"), RUN_PLAY_SCENE);
|
scene_tabs_context_menu->add_item(TTR("Play This Scene"), RUN_PLAY_SCENE);
|
||||||
|
|
||||||
scene_tabs_context_menu->add_separator();
|
scene_tabs_context_menu->add_separator();
|
||||||
Ref<Shortcut> close_tab_sc = ED_GET_SHORTCUT("editor/close_scene");
|
scene_tabs_context_menu->add_shortcut(ED_GET_SHORTCUT("editor/close_scene"), FILE_CLOSE);
|
||||||
close_tab_sc->set_name(TTR("Close Tab"));
|
scene_tabs_context_menu->set_item_text(scene_tabs_context_menu->get_item_index(FILE_CLOSE), TTR("Close Tab"));
|
||||||
scene_tabs_context_menu->add_shortcut(close_tab_sc, FILE_CLOSE);
|
scene_tabs_context_menu->add_shortcut(ED_GET_SHORTCUT("editor/reopen_closed_scene"), FILE_OPEN_PREV);
|
||||||
Ref<Shortcut> undo_close_tab_sc = ED_GET_SHORTCUT("editor/reopen_closed_scene");
|
scene_tabs_context_menu->set_item_text(scene_tabs_context_menu->get_item_index(FILE_OPEN_PREV), TTR("Undo Close Tab"));
|
||||||
undo_close_tab_sc->set_name(TTR("Undo Close Tab"));
|
|
||||||
scene_tabs_context_menu->add_shortcut(undo_close_tab_sc, FILE_OPEN_PREV);
|
|
||||||
if (previous_scenes.is_empty()) {
|
if (previous_scenes.is_empty()) {
|
||||||
scene_tabs_context_menu->set_item_disabled(scene_tabs_context_menu->get_item_index(FILE_OPEN_PREV), true);
|
scene_tabs_context_menu->set_item_disabled(scene_tabs_context_menu->get_item_index(FILE_OPEN_PREV), true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user