mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Merge pull request #102258 from Squamto/master
Fix Error when connecting signal with unbinds not yet existing function
This commit is contained in:
commit
3c9f065e27
1 changed files with 7 additions and 7 deletions
|
@ -1001,13 +1001,6 @@ void ConnectionsDock::_make_or_edit_connection() {
|
|||
}
|
||||
}
|
||||
|
||||
if (connect_dialog->is_editing()) {
|
||||
_disconnect(connect_dialog->get_source_connection_data());
|
||||
_connect(cd);
|
||||
} else {
|
||||
_connect(cd);
|
||||
}
|
||||
|
||||
if (add_script_function_request) {
|
||||
PackedStringArray script_function_args = connect_dialog->get_signal_args();
|
||||
script_function_args.resize(script_function_args.size() - cd.unbinds);
|
||||
|
@ -1057,6 +1050,13 @@ void ConnectionsDock::_make_or_edit_connection() {
|
|||
EditorNode::get_singleton()->emit_signal(SNAME("script_add_function_request"), target, cd.method, script_function_args);
|
||||
}
|
||||
|
||||
if (connect_dialog->is_editing()) {
|
||||
_disconnect(connect_dialog->get_source_connection_data());
|
||||
_connect(cd);
|
||||
} else {
|
||||
_connect(cd);
|
||||
}
|
||||
|
||||
update_tree();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue