Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fixed 'Move Up/Down' editing foreign nodes.

Edward Chan135a7361a28c
diff --git a/editor/docks/scene_tree_dock.cpp b/editor/docks/scene_tree_dock.cpp
index 285fb655da4..c9ffa11c749 100644
--- a/editor/docks/scene_tree_dock.cpp
+++ b/editor/docks/scene_tree_dock.cpp
@@ -885,14 +885,14 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
break;
}
- if (!_validate_no_foreign_selected(editor_selection->get_top_selected_node_list())) {
+ List<Node *> selection = editor_selection->get_full_selected_node_list();
+ if (!_validate_no_foreign_selected(selection)) {
break;
}
bool MOVING_DOWN = (p_tool == TOOL_MOVE_DOWN);
bool MOVING_UP = !MOVING_DOWN;
- List<Node *> selection = editor_selection->get_full_selected_node_list();
selection.sort_custom<Node::Comparator>(); // sort by index
if (MOVING_DOWN) {
selection.reverse();