ensure objects are in the correct thread when loading
Since we load in a separate thread, when the QObject based objects are instantiated, they're created with affinity to that separate thread. Now we specifically ensure they are moved to the main thread after their creation.
This commit is contained in:
@@ -282,23 +282,3 @@ QByteArray NodeParam::ValueToBytesInternal(const QVariant &v)
|
||||
|
||||
return bytes;
|
||||
}
|
||||
|
||||
void NodeParam::SaveConnections(QXmlStreamWriter *writer) const
|
||||
{
|
||||
writer->writeStartElement("connections");
|
||||
|
||||
foreach (NodeEdgePtr edge, edges_) {
|
||||
NodeParam* other;
|
||||
|
||||
if (edge->input() == this) {
|
||||
other = edge->output();
|
||||
} else {
|
||||
other = edge->input();
|
||||
}
|
||||
|
||||
writer->writeTextElement("connection",
|
||||
QString::number(reinterpret_cast<quintptr>(other)));
|
||||
}
|
||||
|
||||
writer->writeEndElement(); // connections
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user