diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-23 10:34:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-23 10:34:13 +0100 |
commit | 939c4bbe3ff1e30d716b90e8289b88c5b6eaffbe (patch) | |
tree | c08e7de6d8f9cfa5825d657c308128c66eee881e /editor | |
parent | f7a92eec0342ed09a1d7e5a69fd29842a5923f1b (diff) | |
parent | 4e64c9fd4dac5478e97b461897ec559ceeb580ef (diff) |
Merge pull request #47261 from KoBeWi/filterdropper
Allow to drop files on filtered scene tree
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_editor.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index e9de91f851..b5e9aec854 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -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) { |