Readd a method to prevent UI locking by NSDocument.
This commit is contained in:
1 parent
42097d267d
commit
33c4ff89ac
2 files changed
+19
No files matched your search
@@ -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
|
||||
@@ -200,6 +200,9 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the progress modal sheet.
|
||||
*/
|
||||
- (void)showProgressSheet
|
||||
{
|
||||
self.progressBar.doubleValue = 0;
|
||||
|
||||
Reference in new issue
Block a user