diff options
author | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2018-07-25 08:56:03 -0700 |
---|---|---|
committer | K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com> | 2018-07-25 08:56:03 -0700 |
commit | 5b2c4b77e20ef6db1c51c051bc79709f8da60a11 (patch) | |
tree | b1b5c3705eba372793d1ad090bd9dce5850d7595 /modules | |
parent | 41a0ecb59b244ee01ece644107f02c64d2a5b64a (diff) |
Visualscript: Hide empty categories for basic types and methods.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/visual_script/visual_script_property_selector.cpp | 8 |
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); } |