So my situation is this. I am using GoDiagrams 2.5.2. When I copy and paste within a GoView, it appears to me that it is recreating the structure outside of the document and then adding the structure to the document. What I need is for the structure to be recreated in the document itself. Let me give an example to clarify that a bit.
I have a GoSubGraph which has GoNodes and other GoSubGraphs inside of it. The sub graphs could be nested arbitrarily deep. When that top level GoSubGraph is selected and copied, and then pasted into the same document, the only DocumentChanged event with a hint that suggests something has been inserted is for the base subgraph. This suggests to me that the base subgraph has been copied, and then all of it’s contents have been copied into it, and then it is being added to the Document. What I need is for the structure to be created in the Document on paste so that there is a DocumentChanged event showing that the base subgraph and all of it’s children have been added (both GoLayer.InsertedObject and GoLayer.ChangedObject/GoGroup.InsertedObject).
While looking into this problem, I found that the Document.CopyFromCollection method is being used to do the actual pasting. Please correct me if I’m wrong about that. My current plan is to override the PasteFromClipboard method and have it use another function of my creation which serves much the same function as CopyFromCollection, but recreates the structure inside of the document instead of outside.
Before I undertake this somewhat significant task, I’m wondering if there is an easier or better way of doing what I’d like to do. If this is a good approach, I’m wondering what happens to the GoCopyDictionary after it is returned from the PasteFromClipboard function, and if it is important that I fill it correctly. Thanks in advance for your help.