mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Speed up large selections in the editor
This commit is contained in:
parent
a3b42d85d2
commit
1c8e3f9037
12 changed files with 111 additions and 86 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue