Readd a method to prevent UI locking by NSDocument.

This commit is contained in:
Damiano Galassi committed 2016-07-25 09:51:46 +02:00
1 parent 42097d267d
commit 33c4ff89ac
2 files changed
+19

No files matched your search

+16
View File
@@ -233,4 +233,20 @@
}
- (nullable __kindof NSDocument *)documentForURL:(NSURL *)url
{
NSArray<__kindof NSDocument *> *documents = nil;
@synchronized(self) {
documents = [self.documents copy];
}
for (NSDocument *doc in documents) {
if ([doc.fileURL isEqualTo:url.filePathURL]) {
return doc;
}
}
return nil;
}
@end
+3
View File
@@ -200,6 +200,9 @@
return YES;
}
/**
* Show the progress modal sheet.
*/
- (void)showProgressSheet
{
self.progressBar.doubleValue = 0;