Merge pull request #59269 from Vitika9/59196

This commit is contained in:
Rémi Verschelde 2022-03-18 11:25:45 +01:00 committed by GitHub
commit d9382b2216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2735,7 +2735,10 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
if (profile_allow_editing) {
bool add_separator = false;
if (full_selection.size() == 1) {
add_separator = true;
menu->add_icon_shortcut(get_theme_icon(SNAME("Rename"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/rename"), TOOL_RENAME);
}
@ -2748,11 +2751,14 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
}
if (can_replace) {
add_separator = true;
menu->add_icon_shortcut(get_theme_icon(SNAME("Reload"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/change_node_type"), TOOL_REPLACE);
}
if (scene_tree->get_selected() != edited_scene) {
menu->add_separator();
if (add_separator) {
menu->add_separator();
}
menu->add_icon_shortcut(get_theme_icon(SNAME("MoveUp"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP);
menu->add_icon_shortcut(get_theme_icon(SNAME("MoveDown"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN);
menu->add_icon_shortcut(get_theme_icon(SNAME("Duplicate"), SNAME("EditorIcons")), ED_GET_SHORTCUT("scene_tree/duplicate"), TOOL_DUPLICATE);