mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #109515 from precup/speedy-selections
Speed up large selections in the editor
This commit is contained in:
commit
709226ad1c
12 changed files with 111 additions and 86 deletions
|
|
@ -2880,8 +2880,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue