diff options
author | Eric Rybicki <info@ericrybicki.com> | 2019-02-27 21:45:55 +0100 |
---|---|---|
committer | Eric Rybicki <info@ericrybicki.com> | 2019-02-27 21:45:55 +0100 |
commit | 069bbd35df2f2ab1cbf23121b26774046f8ad183 (patch) | |
tree | c7016d559fc398a03b8c0bca32cc4d27acf555f2 /editor/editor_sectioned_inspector.cpp | |
parent | caa42667e801318fcb78c9f52921a48cf985b62f (diff) | |
download | redot-engine-069bbd35df2f2ab1cbf23121b26774046f8ad183.tar.gz |
Hide global section in project settings when no property is defined
Prevent _global_script entries in project settings without section from being loaded
fixes #26247
Diffstat (limited to 'editor/editor_sectioned_inspector.cpp')
-rw-r--r-- | editor/editor_sectioned_inspector.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_sectioned_inspector.cpp b/editor/editor_sectioned_inspector.cpp index acc7637c0b..e7019e4ef6 100644 --- a/editor/editor_sectioned_inspector.cpp +++ b/editor/editor_sectioned_inspector.cpp @@ -80,7 +80,7 @@ class SectionedInspectorFilter : public Object { PropertyInfo pi = E->get(); int sp = pi.name.find("/"); - if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/")) //skip resource stuff + if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/") || pi.name.begins_with("_global_script")) //skip resource stuff continue; if (sp == -1) { @@ -233,7 +233,7 @@ void SectionedInspector::update_category_list() { else if (!(pi.usage & PROPERTY_USAGE_EDITOR)) continue; - if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene") + if (pi.name.find(":") != -1 || pi.name == "script" || pi.name == "resource_name" || pi.name == "resource_path" || pi.name == "resource_local_to_scene" || pi.name.begins_with("_global_script")) continue; if (search_box && search_box->get_text() != String() && pi.name.findn(search_box->get_text()) == -1) |