From 5c240ded7fec0c9aeabb6a0d21c1e2e418bcabcc Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 18 Oct 2017 15:43:20 +0200 Subject: [PATCH] Fixed issue with some sheets hanging around when the database is locked --- MacPass/MPDocument.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MacPass/MPDocument.m b/MacPass/MPDocument.m index 18c8ecbf..f32a7e4d 100644 --- a/MacPass/MPDocument.m +++ b/MacPass/MPDocument.m @@ -413,6 +413,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou */ // only lock if we do not have user interaction that cannot be dismissed! if(!self.lockedForFileChange) { + for(NSWindow *sheet in [self windowForSheet].sheets) { + [[self windowForSheet] endSheet:sheet]; + } [self saveDocumentWithDelegate:self didSaveSelector:@selector(_lockDatabaseForDocument:didSave:contextInfo:) contextInfo:NULL]; } }