From 4f98584a2e980cf302b19b311503761c6ebdbcd1 Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 25 Oct 2017 11:14:40 +0200 Subject: [PATCH] remove undo action after tree reset (eg. after import) --- MacPass/MPDocument.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index b331ba65..1987a378 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -534,6 +534,8 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou - (void)setTree:(KPKTree *)tree { if(self.tree != tree) { + /* reseting the tree make undo a bit useless */ + [self.undoManager removeAllActions]; _tree = tree; if(nil == self.treeDelegate) { self.treeDelegate = [[MPTreeDelegate alloc] initWithDocument:self];