Perform `showEntryInCatalog` method on main thread #716

Merged
merged 1 commit into from Feb 23, 2012
@@ -132,8 +132,8 @@ - (NSArray *)validActionsForDirectObject:(QSObject *)dObject indirectObject:(QSO
}
- (QSObject *)show:(QSObject *)dObject {
- [NSClassFromString(@"QSCatalogPrefPane") showEntryInCatalog:[[QSLibrarian sharedInstance] entryForID:[dObject objectForType:QSCatalogEntryPboardType]]];
- return nil;
+ [NSClassFromString(@"QSCatalogPrefPane") performSelectorOnMainThread:@selector(showEntryInCatalog:) withObject:[[QSLibrarian sharedInstance] entryForID:[dObject objectForType:QSCatalogEntryPboardType]] waitUntilDone:NO];
+ return nil;
}
- (QSObject *)rescan:(QSObject *)dObject {
@@ -77,8 +77,9 @@ - (QSObject *)findObjectInCatalog:(QSObject *)dObject {
QSCatalogEntry *theEntry = [[QSLibrarian sharedInstance] firstEntryContainingObject:dObject];
- [NSClassFromString(@"QSCatalogPrefPane") showEntryInCatalog:theEntry];
- return nil;
+ [NSClassFromString(@"QSCatalogPrefPane") performSelectorOnMainThread:@selector(showEntryInCatalog:) withObject:theEntry waitUntilDone:NO];
+
+ return nil;
}
- (NSWindow *)windowForObject:(QSObject *)object atPoint:(NSPoint)loc {