Ensure one shot signals are not disconnected while edited, closes #7776
This commit is contained in:
parent
95a9e51975
commit
ac52eb444f
1 changed files with 9 additions and 1 deletions
|
@ -1209,7 +1209,15 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.flags & CONNECT_ONESHOT) {
|
bool disconnect = c.flags & CONNECT_ONESHOT;
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
if (disconnect && (c.flags & CONNECT_PERSIST) && Engine::get_singleton()->is_editor_hint()) {
|
||||||
|
//this signal was connected from the editor, and is being edited. just dont disconnect for now
|
||||||
|
disconnect = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (disconnect) {
|
||||||
|
|
||||||
_ObjectSignalDisconnectData dd;
|
_ObjectSignalDisconnectData dd;
|
||||||
dd.signal = p_name;
|
dd.signal = p_name;
|
||||||
dd.target = target;
|
dd.target = target;
|
||||||
|
|
Loading…
Reference in a new issue