Open Link Cut paste deletes the open link


#1

my diagram is configured with validunconnected links as valid.

Now I can create a open link for a node. Then I select the node alone and do Ctrl+X on my UI both node and open link of the node which is cut disappears and when I paste it only the node is pasted and the open link connected to it is gone.

What I expect is when I cut and paste, node along with the link should appear as part of Ctrl+V

Could you give some suggestions ?


#2

If you select the partly connected link as well as the node in the Draggable Link sample, and then copy and paste, you will get copies of both the node and the link. That’s true in your app too, isn’t it?

So the basic mechanism can work – it’s just that the default behavior of CommandHandler.Copy isn’t doing what you want. I suppose you could override CommandHandler.CopyToClipboard to augment the argument collection with the Links that you want to include, and then call the base method with the bigger collection.