Fixed issue with some sheets hanging around when the database is locked

This commit is contained in:
michael starke
2017-10-18 15:43:20 +02:00
parent 2523a74053
commit 5c240ded7f

View File

@@ -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];
}
}