Merge pull request #30378 from Kanabenki/sort-selection-duplicate

Sort selected nodes in scene tree before duplication
This commit is contained in:
Rémi Verschelde 2019-07-06 20:31:52 +02:00 committed by GitHub
commit 3c133aebda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -569,7 +569,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *dupsingle = NULL; Node *dupsingle = NULL;
List<Node *> editable_children; 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 *node = E->get();
Node *parent = node->get_parent(); Node *parent = node->get_parent();