From 3b3f5c375b5e2c99dce5a152a26ab2dc71b1d930 Mon Sep 17 00:00:00 2001 From: "zhili.wzl" Date: Wed, 16 Feb 2022 21:27:44 +0800 Subject: [PATCH] chore: reset selected to top tree when redo --- packages/core/src/models/Operation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/models/Operation.ts b/packages/core/src/models/Operation.ts index 783f784fa..750ee8709 100644 --- a/packages/core/src/models/Operation.ts +++ b/packages/core/src/models/Operation.ts @@ -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], } } }