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:
itsmattkc
2023-02-28 22:28:32 -08:00
parent 43e4e78378
commit 066a10e6a0
5 changed files with 108 additions and 13 deletions
+3 -1
View File
@@ -81,6 +81,8 @@ public:
QVector<Node*> nodes;
Node::OutputConnections promised_connections;
};
class Result
@@ -171,7 +173,7 @@ public:
static Result Load(Project *project, const QString &filename, LoadType load_type);
static Result Load(Project *project, QXmlStreamReader *read_device, LoadType load_type);
static Result Paste(LoadType load_type);
static Result Paste(LoadType load_type, Project *project = nullptr);
static Result Save(const SaveData &data, bool compress);
static Result Save(QXmlStreamWriter *write_device, const SaveData &data);