From 3e1ef3d0b5445065ab3f44ffc17bbb04efaa8c8a Mon Sep 17 00:00:00 2001
From: eleanor-park <eleanor_park@brown.edu>
Date: Tue, 23 Jul 2024 12:07:53 -0400
Subject: merging w/ zach's branch

---
 src/client/views/DocumentButtonBar.tsx | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

(limited to 'src/client/views/DocumentButtonBar.tsx')

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;
-- 
cgit v1.2.3-70-g09d2

