mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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:
parent
de8ce3e625
commit
c62302a432
5 changed files with 38 additions and 19 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue