From beadc92e4f3b50c04c38dfc3c5b9b413b68a9a70 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 21 Dec 2023 18:14:10 +0800 Subject: [PATCH] Clear sub-resources list when no sub-resource exists (cherry picked from commit 6e49ff91c0b88792a76c6514f0af25b937e7a9e4) --- editor/inspector_dock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp index 717aaf396fca..1ee273f64b30 100644 --- a/editor/inspector_dock.cpp +++ b/editor/inspector_dock.cpp @@ -139,8 +139,8 @@ void InspectorDock::_menu_option_confirm(int p_option, bool p_confirmed) { } } + unique_resources_list_tree->clear(); if (resource_propnames.size()) { - unique_resources_list_tree->clear(); TreeItem *root = unique_resources_list_tree->create_item(); for (int i = 0; i < resource_propnames.size(); i++) {