mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #112861 from ryevdokimov/fix-csg-preview
Fix preview CSG interfering with itself during drag and drop
This commit is contained in:
commit
4b92028e61
1 changed files with 3 additions and 3 deletions
|
|
@ -4900,13 +4900,13 @@ Vector3 Node3DEditorViewport::_get_instance_position(const Point2 &p_pos, Node3D
|
||||||
|
|
||||||
HashSet<RID> rids;
|
HashSet<RID> rids;
|
||||||
|
|
||||||
if (!preview_node->is_inside_tree() && !ruler->is_inside_tree()) {
|
if (preview_node && preview_node->get_child_count() > 0) {
|
||||||
|
_insert_rid_recursive(preview_node, rids);
|
||||||
|
} else if (!preview_node->is_inside_tree() && !ruler->is_inside_tree()) {
|
||||||
const List<Node *> &selection = editor_selection->get_top_selected_node_list();
|
const List<Node *> &selection = editor_selection->get_top_selected_node_list();
|
||||||
|
|
||||||
Node3D *first_selected_node = Object::cast_to<Node3D>(selection.front()->get());
|
Node3D *first_selected_node = Object::cast_to<Node3D>(selection.front()->get());
|
||||||
|
|
||||||
Array children = first_selected_node->get_children();
|
|
||||||
|
|
||||||
if (first_selected_node) {
|
if (first_selected_node) {
|
||||||
_insert_rid_recursive(first_selected_node, rids);
|
_insert_rid_recursive(first_selected_node, rids);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue