Merge pull request #63321 from kleonc/generic-nodepath-drag-and-drop-fix

This commit is contained in:
Rémi Verschelde 2022-07-22 23:03:40 +02:00 committed by GitHub
commit e2e8a83ddb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3177,6 +3177,11 @@ bool EditorPropertyNodePath::is_drop_valid(const Dictionary &p_drag_data) const
Node *dropped_node = get_tree()->get_edited_scene_root()->get_node(nodes[0]);
ERR_FAIL_NULL_V(dropped_node, false);
if (valid_types.is_empty()) {
// No type requirements specified so any type is valid.
return true;
}
for (const StringName &E : valid_types) {
if (dropped_node->is_class(E)) {
return true;