From 845d8547c42d46722e65a25186e7a6dc3a64c98c Mon Sep 17 00:00:00 2001 From: michael starke Date: Fri, 10 Jul 2015 18:34:24 +0200 Subject: [PATCH] undo is working again --- MacPass/MPDocument.m | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 23638ddc..4e127601 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -418,16 +418,16 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey [[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentCurrentItemChangedNotification object:self]; } } -//- (void)setTree:(KPKTree *)tree { -// if(_tree != tree) { -// _tree = tree; -// _tree.undoManager = [self undoManager]; -// if(nil == _treeDelgate) { -// _treeDelgate = [[MPTreeDelegate alloc] initWithDocument:self]; -// } -// _tree.delegate = _treeDelgate; -// } -//} +- (void)setTree:(KPKTree *)tree { + if(_tree != tree) { + _tree = tree; + _tree.undoManager = [self undoManager]; + if(nil == _treeDelgate) { + _treeDelgate = [[MPTreeDelegate alloc] initWithDocument:self]; + } + _tree.delegate = _treeDelgate; + } +} #pragma mark Data Accesors