-
Notifications
You must be signed in to change notification settings - Fork 931
Description
The constructor for DataFlowGraphicsScene contains this code
connect(&_graphModel,
&DataFlowGraphModel::inPortDataWasSet,
[this](NodeId const nodeId, PortType const, PortIndex const) { onNodeUpdated(nodeId); });
This connection does not appear to be disconnected when the scene is deleted. There's information online that Qt's automatic disconnect does not happen under some circumstances when lambdas are used. I believe this is one of those cases.
What I am seeing is that I replace the scene and then delete the old scene. When the inPortDataWasSet signal is later sent, the onNodeUpdated slot is called for the old delete scene. I overrode disconnectNotify and it was not called for this signal.
In response to your comment for 462. I see the setNodePainter method which should do what I need. I don't, however, see the code that you mention in your comment. NodeGraphicsObject.cpp, line 165 is the blank line in the middle of itemChange and I do not see anything requesting a node painter. The default node painter seems to be hardcoded in the constructor for BasicGraphicsScene, unless replaced by calling setNodePainter.
I'm wondering if I have old code. Most of the files I have are from march 2024. I don't see a version number anywhere but the person who built qtnodes labeled things v3-08
QVariant NodeGraphicsObject::itemChange(GraphicsItemChange change, const QVariant &value)
{
if (change == ItemScenePositionHasChanged && scene()) {
moveConnections();
}
return QGraphicsObject::itemChange(change, value);
}