summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Hilbrunner <mhilbrunner@users.noreply.github.com>2018-07-25 20:08:05 +0200
committerGitHub <noreply@github.com>2018-07-25 20:08:05 +0200
commitbacc02b7d810e5ba98d93e441861843d29016110 (patch)
treef4f214c7bcd870b582d44308b4ebee1706fab1a9
parentfe28e323b39c008229180207576d258f1f171efe (diff)
parent5b2c4b77e20ef6db1c51c051bc79709f8da60a11 (diff)
Merge pull request #20452 from fire/vs_hide_empty_categories_20433
Visualscript: Hide empty categories for basic types and methods.
-rw-r--r--modules/visual_script/visual_script_property_selector.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp
index 994ea1f791..123d697081 100644
--- a/modules/visual_script/visual_script_property_selector.cpp
+++ b/modules/visual_script/visual_script_property_selector.cpp
@@ -222,6 +222,10 @@ void VisualScriptPropertySelector::_update_search() {
item->set_selectable(0, true);
}
}
+
+ if (category && category->get_children() == NULL) {
+ memdelete(category); //old category was unused
+ }
}
if (seq_connect == true && visual_script_generic == false) {
@@ -348,6 +352,10 @@ void VisualScriptPropertySelector::_update_search() {
found = true;
}
+ if (category && category->get_children() == NULL) {
+ memdelete(category); //old category was unused
+ }
+
get_ok()->set_disabled(root->get_children() == NULL);
}