1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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

@@ -1312,11 +1312,17 @@ void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_
}
// Emitted "selected" in _selected_changed() when select single node, so select multiple node emit "changed".
if (editor_selection->get_selected_nodes().size() > 1) {
emit_signal(SNAME("node_changed"));
if (editor_selection->get_selection().size() > 1 && !pending_selection_update) {
pending_selection_update = true;
callable_mp(this, &SceneTreeEditor::_process_selection_update).call_deferred();
}
}
void SceneTreeEditor::_process_selection_update() {
pending_selection_update = false;
emit_signal(SNAME("node_changed"));
}
void SceneTreeEditor::_tree_scroll_to_item(ObjectID p_item_id) {
ERR_FAIL_NULL(tree);
TreeItem *item = ObjectDB::get_instance<TreeItem>(p_item_id);