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

@@ -148,18 +148,20 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
F.name = F.name.replace_first("metadata/", "Metadata/"); // Trick to not get actual metadata edited from MultiNodeEdit.
}
if (!usage.has(F.name)) {
PLData *usage_data = usage.getptr(F.name);
if (!usage_data) {
PLData pld;
pld.uses = 0;
pld.info = F;
pld.info.name = F.name;
usage[F.name] = pld;
data_list.push_back(usage.getptr(F.name));
HashMap<String, MultiNodeEdit::PLData>::Iterator I = usage.insert(F.name, pld);
usage_data = &I->value;
data_list.push_back(usage_data);
}
// Make sure only properties with the same exact PropertyInfo data will appear.
if (usage[F.name].info == F) {
usage[F.name].uses++;
if (usage_data->info == F) {
usage_data->uses++;
}
}