Skip to content

Commit

Permalink
chore: reset selected to top tree when redo
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Feb 16, 2022
1 parent 118205c commit 3b3f5c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/models/Operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,14 @@ export class Operation {
this.tree.from(operation.tree)
}
if (operation.selected) {
this.selection.batchSelect(operation.selected)
this.selection.selected = operation.selected
}
}

serialize(): IOperation {
return {
tree: this.tree.serialize(),
selected: this.selection.selected,
selected: [this.tree.id],
}
}
}

0 comments on commit 3b3f5c3

Please sign in to comment.