Skip to content

Commit 4b92028

Browse files
committed
Merge pull request #112861 from ryevdokimov/fix-csg-preview
Fix preview CSG interfering with itself during drag and drop
2 parents 376a19e + 7df165c commit 4b92028

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
@@ -4900,13 +4900,13 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos, Node3D
49004900

49014901
HashSet<RID> rids;
49024902

4903-
if (!preview_node->is_inside_tree() && !ruler->is_inside_tree()) {
4903+
if (preview_node && preview_node->get_child_count() > 0) {
4904+
_insert_rid_recursive(preview_node, rids);
4905+
} else if (!preview_node->is_inside_tree() && !ruler->is_inside_tree()) {
49044906
const List<Node *> &selection = editor_selection->get_top_selected_node_list();
49054907

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

4908-
Array children = first_selected_node->get_children();
4909-
49104910
if (first_selected_node) {
49114911
_insert_rid_recursive(first_selected_node, rids);
49124912
}

0 commit comments

Comments
 (0)