You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Allow to easily rename multiple nodes
Co-authored-by: ajreckof <tbonhoure@ymail.Com>
This commit is contained in:
@@ -3370,12 +3370,7 @@ 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_editor_theme_icon(SNAME("Rename")), ED_GET_SHORTCUT("scene_tree/rename"), TOOL_RENAME);
|
||||
}
|
||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("Rename")), ED_GET_SHORTCUT("scene_tree/rename"), TOOL_RENAME);
|
||||
|
||||
bool can_replace = true;
|
||||
for (Node *E : selection) {
|
||||
@@ -3386,14 +3381,11 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
|
||||
}
|
||||
|
||||
if (can_replace) {
|
||||
add_separator = true;
|
||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("Reload")), ED_GET_SHORTCUT("scene_tree/change_node_type"), TOOL_REPLACE);
|
||||
}
|
||||
|
||||
if (scene_tree->get_selected() != edited_scene) {
|
||||
if (add_separator) {
|
||||
menu->add_separator();
|
||||
}
|
||||
menu->add_separator();
|
||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("MoveUp")), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP);
|
||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("MoveDown")), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN);
|
||||
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("Duplicate")), ED_GET_SHORTCUT("scene_tree/duplicate"), TOOL_DUPLICATE);
|
||||
|
||||
Reference in New Issue
Block a user