Merge pull request #77511 from KoBeWi/destroy_size()

Minor improvements to sub-resource list
This commit is contained in:
Yuri Sizov 2023-05-27 17:51:06 +02:00 committed by GitHub
commit 36e7800679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -3578,6 +3578,13 @@ void SceneTreeDock::_list_all_subresources(PopupMenu *p_menu) {
p_menu->set_item_metadata(-1, pair.first->get_instance_id());
}
}
if (resources_by_type.is_empty()) {
p_menu->add_item(TTR("None"));
p_menu->set_item_disabled(-1, true);
}
p_menu->reset_size();
}
void SceneTreeDock::_gather_resources(Node *p_node, List<Pair<Ref<Resource>, Node *>> &r_resources) {