diff options
Diffstat (limited to 'editor/editor_folding.cpp')
-rw-r--r-- | editor/editor_folding.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp index 29e3236ac2..b8341ee406 100644 --- a/editor/editor_folding.cpp +++ b/editor/editor_folding.cpp @@ -113,7 +113,7 @@ void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p if (E.usage & PROPERTY_USAGE_EDITOR) { if (E.type == Variant::OBJECT) { RES res = p_node->get(E.name); - if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) { + if (res.is_valid() && !resources.has(res) && !res->get_path().is_empty() && !res->get_path().is_resource_file()) { Vector<String> res_unfolds = _get_unfolds(res.ptr()); resource_folds.push_back(res->get_path()); resource_folds.push_back(res_unfolds); @@ -243,8 +243,8 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) { //can unfold if (E.usage & PROPERTY_USAGE_EDITOR) { - if (group != "") { //group - if (group_base == String() || E.name.begins_with(group_base)) { + if (!group.is_empty()) { //group + if (group_base.is_empty() || E.name.begins_with(group_base)) { bool can_revert = EditorPropertyRevert::can_property_revert(p_object, E.name); if (can_revert) { unfold_group.insert(group); @@ -262,11 +262,7 @@ void EditorFolding::_do_object_unfolds(Object *p_object, Set<RES> &resources) { if (E.type == Variant::OBJECT) { RES res = p_object->get(E.name); - print_line("res: " + String(E.name) + " valid " + itos(res.is_valid())); - if (res.is_valid()) { - print_line("path " + res->get_path()); - } - if (res.is_valid() && !resources.has(res) && res->get_path() != String() && !res->get_path().is_resource_file()) { + if (res.is_valid() && !resources.has(res) && !res->get_path().is_empty() && !res->get_path().is_resource_file()) { resources.insert(res); _do_object_unfolds(res.ptr(), resources); } |