restore
fun restore(model: NodeGraphModel, create: (NodeModel) -> GraphNode? = { m ->
GraphNode(m.title, m.inputs.map { Port(it.name, it.type, it.color) }, m.outputs.map { Port(it.name, it.type, it.color) }, data = m.id)
}): List<GraphNode?>(source)
Replaces the nodes and wires by those of model, firing the events of the removals and the additions; create makes the node of a NodeModel, by default with its ports and with its id as data, or none to leave it out. Wires that do not fit their nodes, or that canConnect refuses, are left out. Not recorded in the history.
Return
the nodes, by the index of their models