diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-08-18 10:55:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-18 10:55:16 +0200 |
commit | 5c853a45e632b0d912f3616c749120f28e29b66a (patch) | |
tree | a67ed67e4bb2446df12dd3070d3c3b67c86bb61e /scene/main/node.cpp | |
parent | 343466c0159dc5e77ab1ce8ea313b1decbc5665b (diff) | |
parent | c62302a4321323625a00ba0f3e474db8a74e012f (diff) |
Merge pull request #31423 from Calinou/improve-node-signal-group-tooltip
Improve the scene tree signals/groups tooltip
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r-- | scene/main/node.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 0aaba5491a..0b3a193d18 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -1716,14 +1716,17 @@ void Node::get_groups(List<GroupInfo> *p_groups) const { } } -bool Node::has_persistent_groups() const { +int Node::get_persistent_group_count() const { + + int count = 0; for (const Map<StringName, GroupData>::Element *E = data.grouped.front(); E; E = E->next()) { - if (E->get().persistent) - return true; + if (E->get().persistent) { + count += 1; + } } - return false; + return count; } void Node::_print_tree_pretty(const String &prefix, const bool last) { |