1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Speed up large selections in the editor

This commit is contained in:
Mike Precup
2025-08-08 11:28:47 -07:00
parent a3b42d85d2
commit 1c8e3f9037
12 changed files with 111 additions and 86 deletions

View File

@@ -2881,8 +2881,13 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
}
if (!multi_nodes.is_empty()) {
// Pick the top-most node.
multi_nodes.sort_custom<Node::Comparator>();
selected_node = multi_nodes[0];
Node::Comparator comparator;
for (Node *node : multi_nodes) {
if (comparator(node, selected_node)) {
selected_node = node;
}
}
}
}
}