clear undo stack on lock

This commit is contained in:
michael starke
2016-02-29 12:47:07 +01:00
parent bbfa3892fd
commit 90c731cbb0

View File

@@ -281,6 +281,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
[self saveDocument:sender]; [self saveDocument:sender];
self.encryptedData = [self.tree encryptWithPassword:self.compositeKey forVersion:KPKXmlVersion error:&error]; self.encryptedData = [self.tree encryptWithPassword:self.compositeKey forVersion:KPKXmlVersion error:&error];
self.tree = nil; self.tree = nil;
[self.undoManager removeAllActions];
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidLockDatabaseNotification object:self]; [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidLockDatabaseNotification object:self];
} }