You've already forked godot
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user