mirror of
https://github.com/godotengine/godot.git
synced 2024-12-27 05:12:44 +00:00
Merge pull request #19437 from volzhs/live-edit-reparent-child
Make same child index as edited scene when using live edit
This commit is contained in:
commit
a6c9b11de1
@ -1248,7 +1248,7 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
|
||||
path_renames[ni].second = fixed_node_path;
|
||||
}
|
||||
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, -1);
|
||||
editor_data->get_undo_redo().add_do_method(sed, "live_debug_reparent_node", edited_scene->get_path_to(node), edited_scene->get_path_to(new_parent), new_name, p_position_in_parent + inc);
|
||||
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)) + "/" + new_name), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
|
||||
|
||||
if (p_keep_global_xform) {
|
||||
|
Loading…
Reference in New Issue
Block a user