From 02c5e1b2dc7d6ee0956253f123a6dfac0cec63dc Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Tue, 19 Mar 2019 17:09:00 +0100 Subject: [PATCH] Hotfix for edit state bug (fixes #890) --- MacPass/MPDocument+Search.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MacPass/MPDocument+Search.m b/MacPass/MPDocument+Search.m index af22e3f2..3c0ffab7 100644 --- a/MacPass/MPDocument+Search.m +++ b/MacPass/MPDocument+Search.m @@ -44,7 +44,7 @@ NSString *const kMPDocumentSearchResultsKey = @"kMPDocumentSearchResul self.searchContext = context; [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidRedoChangeNotification object:self.undoManager]; [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidUndoChangeNotification object:self.undoManager]; - [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidCloseUndoGroupNotification object:self.undoManager]; + //[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(updateSearch:) name:NSUndoManagerDidCloseUndoGroupNotification object:self.undoManager]; [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidEnterSearchNotification object:self]; [self updateSearch:self]; } @@ -74,7 +74,7 @@ NSString *const kMPDocumentSearchResultsKey = @"kMPDocumentSearchResul - (void)exitSearch:(id)sender { [NSNotificationCenter.defaultCenter removeObserver:self name:NSUndoManagerDidUndoChangeNotification object:self.undoManager]; [NSNotificationCenter.defaultCenter removeObserver:self name:NSUndoManagerDidRedoChangeNotification object:self.undoManager]; - [NSNotificationCenter.defaultCenter removeObserver:self name:NSUndoManagerDidCloseUndoGroupNotification object:self.undoManager]; + //[NSNotificationCenter.defaultCenter removeObserver:self name:NSUndoManagerDidCloseUndoGroupNotification object:self.undoManager]; self.searchContext = nil; [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidExitSearchNotification object:self]; }