I'm working on the restructuring the node hierarchy, and after changing
the Node class, I found the following problem:
in the file itemdocumentdata.cpp, lines 1066 and 1067, the method
ItemDocumentData::mergeWithDocument tries to create a new connector, with
some start and end node. The problem is that the Node class doesn't have
such interface, because it's not known if the node is an electronic or a
flow node. (addInputConnector and addOutputConnector)
The "healty" solution would be to inherit two classes from
ItemDocumentData: one for electronic stuff, and one for flowparts. The
problem is that this implies a lot of work to do.
The other, more hacky thing that can be done is to create the needed
interface as virtual methods in class Node, and for electronic node just
call the proper interface (so calling addInputConnector ==
addOutputConnector == addConnector, for an ECNode ). This is more easier,
but all these functions should be removed when the ItemDocumentClass is
What is your opinion?