diff --git a/app/widget/nodeview/nodeview.cpp b/app/widget/nodeview/nodeview.cpp index 5500f1bba..17ab4fd45 100644 --- a/app/widget/nodeview/nodeview.cpp +++ b/app/widget/nodeview/nodeview.cpp @@ -1092,6 +1092,9 @@ QVector NodeView::ProcessDroppingAttachedNodes(MultiUndoCommand *command, // Add node to the same graph that the context is in if (ai.node->parent() != select_context->parent()) { add_command->add_child(new NodeAddCommand(select_context->parent(), ai.node)); + if (ai.node->IsItem() && !ai.node->folder()) { + add_command->add_child(new FolderAddChild(select_context->parent()->root(), ai.node)); + } } // Add node to the context diff --git a/app/widget/timelinewidget/timelinewidget.cpp b/app/widget/timelinewidget/timelinewidget.cpp index 450561be3..5aa06ebe5 100644 --- a/app/widget/timelinewidget/timelinewidget.cpp +++ b/app/widget/timelinewidget/timelinewidget.cpp @@ -1945,8 +1945,12 @@ bool TimelineWidget::PasteInternal(bool insert) MultiUndoCommand *command = new MultiUndoCommand(); + Project *project = GetConnectedNode()->project(); foreach (Node *n, res.GetLoadData().nodes) { - command->add_child(new NodeAddCommand(GetConnectedNode()->project(), n)); + command->add_child(new NodeAddCommand(project, n)); + if (n->IsItem() && !n->folder()) { + command->add_child(new FolderAddChild(project->root(), n)); + } } rational paste_start = GetConnectedNode()->GetPlayhead();