summaryrefslogtreecommitdiff
path: root/scene/main/node.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-08-18 10:55:16 +0200
committerGitHub <noreply@github.com>2019-08-18 10:55:16 +0200
commit5c853a45e632b0d912f3616c749120f28e29b66a (patch)
treea67ed67e4bb2446df12dd3070d3c3b67c86bb61e /scene/main/node.cpp
parent343466c0159dc5e77ab1ce8ea313b1decbc5665b (diff)
parentc62302a4321323625a00ba0f3e474db8a74e012f (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.cpp11
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) {