From 90c731cbb0e75411dcefd35eaeb3743ef0ce737f Mon Sep 17 00:00:00 2001 From: michael starke Date: Mon, 29 Feb 2016 12:47:07 +0100 Subject: [PATCH] clear undo stack on lock --- MacPass/MPDocument.m | 1 + 1 file changed, 1 insertion(+) diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index e5091a92..7cdbc67f 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -281,6 +281,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey [self saveDocument:sender]; self.encryptedData = [self.tree encryptWithPassword:self.compositeKey forVersion:KPKXmlVersion error:&error]; self.tree = nil; + [self.undoManager removeAllActions]; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidLockDatabaseNotification object:self]; }