diff options
-rw-r--r-- | editor/scene_tree_dock.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 5f62ed0702..935946bf24 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -569,7 +569,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *dupsingle = NULL; List<Node *> editable_children; - for (List<Node *>::Element *E = selection.front(); E; E = E->next()) { + selection.sort_custom<Node::Comparator>(); + + for (List<Node *>::Element *E = selection.back(); E; E = E->prev()) { Node *node = E->get(); Node *parent = node->get_parent(); |