From 05663b8633f470ad4baefa896fb9a14596bf5d93 Mon Sep 17 00:00:00 2001 From: kobewi Date: Fri, 26 May 2023 14:18:44 +0200 Subject: [PATCH] Minor improvements to sub-resource list --- editor/scene_tree_dock.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 032f3875bf2..4b661936787 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -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, Node *>> &r_resources) {