diff --git a/editor/limbo_ai_editor_plugin.cpp b/editor/limbo_ai_editor_plugin.cpp index f5cc382..9e2b8ff 100644 --- a/editor/limbo_ai_editor_plugin.cpp +++ b/editor/limbo_ai_editor_plugin.cpp @@ -869,7 +869,7 @@ void LimboAIEditor::_on_tasks_dragged(const TypedArray &p_tasks, Ref task : tasks_list) { + for (const Ref &task : tasks_list) { if (task->get_parent() == p_to_task && p_to_pos > task->get_index()) { before_pos += 1; } @@ -883,7 +883,7 @@ void LimboAIEditor::_on_tasks_dragged(const TypedArray &p_tasks, Ref task : tasks_list) { + for (const Ref &task : tasks_list) { undo_redo->add_undo_method(task->get_parent().ptr(), LW_NAME(add_child_at_index), task, task->get_index()); }