don't clear undo stack on drawing save
This commit is contained in:
parent
ef82c277c0
commit
5f98ed3d53
|
|
@ -3218,6 +3218,9 @@ function noteApp() {
|
|||
throw new Error(detail || res.statusText);
|
||||
}
|
||||
await this.loadNotes();
|
||||
// Manual save: flatten to PNG on disk and reset canvas state from file (clears stroke undo/redo).
|
||||
// Autosave: only persist the PNG; keep drawingOps / redo stacks like note undo after save.
|
||||
if (!silent) {
|
||||
if (this._drawingObjectURL) {
|
||||
URL.revokeObjectURL(this._drawingObjectURL);
|
||||
this._drawingObjectURL = null;
|
||||
|
|
@ -3225,7 +3228,6 @@ function noteApp() {
|
|||
this.drawingOps = [];
|
||||
this.drawingRedoStack = [];
|
||||
await this.initDrawingViewer();
|
||||
if (!silent) {
|
||||
this.toast(this.t('drawing.saved'), { type: 'success' });
|
||||
} else {
|
||||
this.lastSaved = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue