aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentButtonBar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/DocumentButtonBar.tsx')
-rw-r--r--src/client/views/DocumentButtonBar.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx
index 177546fdc..eb0b00472 100644
--- a/src/client/views/DocumentButtonBar.tsx
+++ b/src/client/views/DocumentButtonBar.tsx
@@ -244,12 +244,14 @@ export class DocumentButtonBar extends ObservableReactComponent<{ views: () => (
}
@observable _annoSaved: boolean = false;
- @action
- saveAnno = (targetDoc: Doc) => {
- targetDoc.savedAsAnno = true;
+
+ @undoBatch
+ saveAnno = action((targetDoc: Doc) => {
+ // targetDoc.savedAsAnno = true;
this._annoSaved = true;
- AnnotationPalette.Instance.saveAnno(this.view0, targetDoc);
- };
+ AnnotationPalette.Instance.addToPalette(targetDoc);
+ });
+
@computed
get saveAnnoButton() {
const targetDoc = this.view0?.Document;