Forráskód Böngészése

Allow to drop files on filtered scene tree

(cherry picked from commit 4e64c9fd4dac5478e97b461897ec559ceeb580ef)
kobewi 4 éve
szülő
commit
b824895065
1 módosított fájl, 1 hozzáadás és 3 törlés
  1. 1 3
      editor/scene_tree_editor.cpp

+ 1 - 3
editor/scene_tree_editor.cpp

@@ -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) {