timeline: avoid duplicate items or item dependencies when pasting
God damn this was a big oof. Pasting was inadvertently making duplicates of the footage node(s) every single time. Worst case was if the clip was connected to a nested sequence. Every time someone copy/pasted in my large-scale project, it would add another 1000 nodes to the project. It's about fucking time this was fixed.
This commit is contained in:
@@ -136,7 +136,7 @@ ProjectSerializer::Result ProjectSerializer::Load(Project *project, QXmlStreamRe
|
||||
return res;
|
||||
}
|
||||
|
||||
ProjectSerializer::Result ProjectSerializer::Paste(LoadType load_type)
|
||||
ProjectSerializer::Result ProjectSerializer::Paste(LoadType load_type, Project *project)
|
||||
{
|
||||
QString clipboard = Core::PasteStringFromClipboard();
|
||||
if (clipboard.isEmpty()) {
|
||||
@@ -145,7 +145,7 @@ ProjectSerializer::Result ProjectSerializer::Paste(LoadType load_type)
|
||||
|
||||
QXmlStreamReader reader(clipboard);
|
||||
|
||||
return ProjectSerializer::Load(nullptr, &reader, load_type);
|
||||
return ProjectSerializer::Load(project, &reader, load_type);
|
||||
}
|
||||
|
||||
ProjectSerializer::Result ProjectSerializer::Save(const SaveData &data, bool compress)
|
||||
|
||||
Reference in New Issue
Block a user