1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Improve the scene tree signals/groups tooltip

The tooltip now displays the number of connections and groups
that are assigned to the hovered node.
This commit is contained in:
Hugo Locurcio
2019-08-16 22:30:31 +02:00
parent de8ce3e625
commit c62302a432
5 changed files with 38 additions and 19 deletions

View File

@@ -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) {