1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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

@@ -1415,8 +1415,9 @@ void Object::get_signal_connection_list(const StringName &p_signal, List<Connect
p_connections->push_back(s->slot_map.getv(i).conn);
}
bool Object::has_persistent_signal_connections() const {
int Object::get_persistent_signal_connection_count() const {
int count = 0;
const StringName *S = NULL;
while ((S = signal_map.next(S))) {
@@ -1424,13 +1425,13 @@ bool Object::has_persistent_signal_connections() const {
const Signal *s = &signal_map[*S];
for (int i = 0; i < s->slot_map.size(); i++) {
if (s->slot_map.getv(i).conn.flags & CONNECT_PERSIST)
return true;
if (s->slot_map.getv(i).conn.flags & CONNECT_PERSIST) {
count += 1;
}
}
}
return false;
return count;
}
void Object::get_signals_connected_to_this(List<Connection> *p_connections) const {