Skip to content

Commit 7df165c

Browse files
committed
Fix preview CSG interfering with itself during drag and drop
1 parent ef34c3d commit 7df165c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

editor/scene/3d/node_3d_editor_plugin.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4852,13 +4852,13 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos, Node3D
48524852

48534853
HashSet<RID> rids;
48544854

4855-
if (!preview_node->is_inside_tree() && !ruler->is_inside_tree()) {
4855+
if (preview_node && preview_node->get_child_count() > 0) {
4856+
_insert_rid_recursive(preview_node, rids);
4857+
} else if (!preview_node->is_inside_tree() && !ruler->is_inside_tree()) {
48564858
const List<Node *> &selection = editor_selection->get_top_selected_node_list();
48574859

48584860
Node3D *first_selected_node = Object::cast_to<Node3D>(selection.front()->get());
48594861

4860-
Array children = first_selected_node->get_children();
4861-
48624862
if (first_selected_node) {
48634863
_insert_rid_recursive(first_selected_node, rids);
48644864
}

0 commit comments

Comments
 (0)