2graphic / sinap-ide

Sinap IDE development project.
7 stars 1 forks source link

like? Parameter for Copy/Paste architecture issue #328

Open danielscottjames opened 7 years ago

danielscottjames commented 7 years ago

The problem is if you copy a node, delete that node, and try to paste. The like? parameter will reference a node that has been deleted from the core model.

The best solution I can think of is the drawableGraph emits a copied event. And the graphEditor holds on to the copied core elements.

Currently this fails quietly.

cj-dimaano commented 7 years ago

Right now, they way cut and copy work, is main tells the editor to save the current selection. I'm thinking we could do something similar with the graph controller--tell it to save the current selection, so that deleted elements don't get garbage collected if they're in the "clipboard".