Edited

data class Edited(val document: TopologyDocument, val path: List<Int>, val history: TopologyEdit.History) : TopologyEdit

The edit applied.

Constructors

Link copied to clipboard
constructor(document: TopologyDocument, path: List<Int>, history: TopologyEdit.History)

Properties

Link copied to clipboard

the document after the edit. The one it was made from is unchanged.

Link copied to clipboard

what this one edit does to the document it was applied to. It is not the warning to show before saving: edits add up and cancel out, so a rename and the rename back are History.REPLACED twice and change nothing. What a save will cost is loaded.changesTo(candidate) (Topology.changesTo), the tree the editor started from against the edited one read back with Topology.from, each change saying through TopologyChange.saveEffect whether it loses history.

Link copied to clipboard
val path: List<Int>

where the edit landed in document: the node edited, added, renamed or moved, or, for a removal, the parent the child was removed from.