diff options
-rw-r--r-- | Source/SPTableRelations.m | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 0caf78b6..134aa2fb 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -53,6 +53,7 @@ static NSString *SPRelationOnDeleteKey = @"on_delete"; - (void)_refreshRelationDataForcingCacheRefresh:(BOOL)clearAllCaches; - (void)_updateAvailableTableColumns; +- (void)addAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; @end @@ -215,15 +216,18 @@ static NSString *SPRelationOnDeleteKey = @"on_delete"; } } - [[alert onMainThread] beginSheetModalForWindow:[tableDocumentInstance parentWindow] completionHandler:^(NSModalResponse returnCode) { - [self performSelector:@selector(openRelationSheet:) withObject:self afterDelay:0.0]; - }]; + [[alert onMainThread] beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(addAlertDidEnd:returnCode:contextInfo:) contextInfo:NULL]; } else { [self _refreshRelationDataForcingCacheRefresh:YES]; } } +- (void)addAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +{ + [self performSelector:@selector(openRelationSheet:) withObject:self afterDelay:0.0]; +} + /** * Updates the available columns when the user selects a table. */ |