Allow to drop files on filtered scene tree

(cherry picked from commit 4e64c9fd4d)
This commit is contained in:
kobewi 2021-03-22 16:35:49 +01:00 committed by Rémi Verschelde
parent 4881d96ef0
commit b824895065
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -1005,8 +1005,6 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
if (!can_rename)
return false; //not editable tree
if (filter != String())
return false; //can't rearrange tree with filter turned on
Dictionary d = p_data;
if (!d.has("type"))
@ -1055,7 +1053,7 @@ bool SceneTreeEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
}
}
return String(d["type"]) == "nodes";
return String(d["type"]) == "nodes" && filter == String();
}
void SceneTreeEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {