Merge pull request #20452 from fire/vs_hide_empty_categories_20433

Visualscript: Hide empty categories for basic types and methods.
This commit is contained in:
Max Hilbrunner 2018-07-25 20:08:05 +02:00 committed by GitHub
commit bacc02b7d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -222,6 +222,10 @@ void VisualScriptPropertySelector::_update_search() {
item->set_selectable(0, true); 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) { if (seq_connect == true && visual_script_generic == false) {
@ -348,6 +352,10 @@ void VisualScriptPropertySelector::_update_search() {
found = true; found = true;
} }
if (category && category->get_children() == NULL) {
memdelete(category); //old category was unused
}
get_ok()->set_disabled(root->get_children() == NULL); get_ok()->set_disabled(root->get_children() == NULL);
} }