diff options
author | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-07 00:31:14 -0500 |
---|---|---|
committer | anika-ahluwalia <anika.ahluwalia@gmail.com> | 2020-08-07 00:31:14 -0500 |
commit | 42a8ba8f3021d4ccc56cfdf4fea1c0bad9d8e818 (patch) | |
tree | a0f715e1df3764dc4172cffe1bb9fcdca6cb4980 /src/client/views/nodes/DocumentView.tsx | |
parent | 1e84a64ffb1f1933eb7e506fa133835fdb1a0972 (diff) |
delete changes
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 707b7d2a1..3592dc393 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -565,14 +565,11 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu } } - @undoBatch + @undoBatch @action deleteClicked = (): void => { if (Doc.UserDoc().activeWorkspace === this.props.Document) { alert("Can't delete the active workspace"); } else { - SelectionManager.DeselectAll(); - this.props.Document.deleted = true; - this.props.removeDocument?.(this.props.Document); const recent = Cast(Doc.UserDoc().myRecentlyClosed, Doc) as Doc; const selected = SelectionManager.SelectedDocuments().slice(); SelectionManager.DeselectAll(); @@ -584,6 +581,9 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu dv.props.removeDocument?.(dv.props.Document); } }); + + this.props.Document.deleted = true; + this.props.removeDocument?.(this.props.Document); } } |