Merge pull request #47261 from KoBeWi/filterdropper

Allow to drop files on filtered scene tree
This commit is contained in:
Rémi Verschelde 2021-03-23 10:34:13 +01:00 committed by GitHub
commit 939c4bbe3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -994,9 +994,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")) {
@ -1049,7 +1046,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) {