diff --git a/app/common/xmlutils.cpp b/app/common/xmlutils.cpp index 9a874a74a..f778b6440 100644 --- a/app/common/xmlutils.cpp +++ b/app/common/xmlutils.cpp @@ -27,7 +27,7 @@ namespace olive { -void XMLConnectNodes(const XMLNodeData &xml_node_data, MultiUndoCommand *command) +void XMLConnectNodes(const XMLNodeData &xml_node_data, uint version, MultiUndoCommand *command) { foreach (const XMLNodeData::SerializedConnection& con, xml_node_data.desired_connections) { Node *out = xml_node_data.node_ptrs.value(con.output_node); @@ -39,13 +39,17 @@ void XMLConnectNodes(const XMLNodeData &xml_node_data, MultiUndoCommand *command if (command) { command->add_child(new NodeEdgeAddCommand(out, con.input)); - /// Deprecated: backwards compatibility only - command->add_child(new NodeSetValueHintCommand(con.input, hint)); + if (version < 210907) { + /// Deprecated: backwards compatibility only + command->add_child(new NodeSetValueHintCommand(con.input, hint)); + } } else { Node::ConnectEdge(out, con.input); - /// Deprecated: backwards compatibility only - con.input.node()->SetValueHintForInput(con.input.input(), hint, con.input.element()); + if (version < 210907) { + /// Deprecated: backwards compatibility only + con.input.node()->SetValueHintForInput(con.input.input(), hint, con.input.element()); + } } } } diff --git a/app/common/xmlutils.h b/app/common/xmlutils.h index 2e0640591..e8b88d6a3 100644 --- a/app/common/xmlutils.h +++ b/app/common/xmlutils.h @@ -55,7 +55,7 @@ struct XMLNodeData { }; -void XMLConnectNodes(const XMLNodeData& xml_node_data, MultiUndoCommand *command = nullptr); +void XMLConnectNodes(const XMLNodeData& xml_node_data, uint version, MultiUndoCommand *command = nullptr); /** * @brief Workaround for QXmlStreamReader::readNextStartElement not detecting the end of a document diff --git a/app/node/nodecopypaste.cpp b/app/node/nodecopypaste.cpp index 21eee76d9..2d66d72ae 100644 --- a/app/node/nodecopypaste.cpp +++ b/app/node/nodecopypaste.cpp @@ -206,7 +206,7 @@ QVector NodeCopyPasteService::PasteNodesFromClipboard(NodeGraph *graph, // Make connections if (!xml_node_data.desired_connections.isEmpty()) { - XMLConnectNodes(xml_node_data, command); + XMLConnectNodes(xml_node_data, data_version, command); } // Link blocks diff --git a/app/node/project/project.cpp b/app/node/project/project.cpp index 0650591c5..f865e28c8 100644 --- a/app/node/project/project.cpp +++ b/app/node/project/project.cpp @@ -196,7 +196,7 @@ void Project::Load(QXmlStreamReader *reader, MainWindowLayoutInfo* layout, uint } // Make connections - XMLConnectNodes(xml_node_data); + XMLConnectNodes(xml_node_data, version); // Link blocks XMLLinkBlocks(xml_node_data);