diff options
author | Max <post@wickenrode.com> | 2015-11-06 00:27:58 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-11-06 00:27:58 +0100 |
commit | b39eb93c5dfb9e0329b008b722e1ea96df1f216c (patch) | |
tree | dd8467283e598ed8ad7bc1b58cd68640aa07f1e4 /Source/SPDatabaseDocument.m | |
parent | 5cd12392fa26ab93303b6b6b43de5a1a31a834f7 (diff) | |
download | sequelpro-b39eb93c5dfb9e0329b008b722e1ea96df1f216c.tar.gz sequelpro-b39eb93c5dfb9e0329b008b722e1ea96df1f216c.tar.bz2 sequelpro-b39eb93c5dfb9e0329b008b722e1ea96df1f216c.zip |
Fix another case of "background thread updating UI"
backport of 27763d429365c0127198f2e9abdd488a61c9f41e
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 05eec2ed..fd61172f 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -5034,20 +5034,23 @@ static NSString *SPAlterDatabaseAction = @"SPAlterDatabase"; } // Select view + SEL viewAction = NULL; if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STRUCTURE"]) - [self viewStructure:self]; + viewAction = @selector(viewStructure:); else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_CONTENT"]) - [self viewContent:self]; + viewAction = @selector(viewContent:); else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_CUSTOMQUERY"]) - [self viewQuery:self]; + viewAction = @selector(viewQuery:); else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_STATUS"]) - [self viewStatus:self]; + viewAction = @selector(viewStatus:); else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_RELATIONS"]) - [self viewRelations:self]; + viewAction = @selector(viewRelations:); else if([[spfSession objectForKey:@"view"] isEqualToString:@"SP_VIEW_TRIGGERS"]) - [self viewTriggers:self]; + viewAction = @selector(viewTriggers:); + + if(viewAction) [self performSelectorOnMainThread:viewAction withObject:self waitUntilDone:YES]; - [self updateWindowTitle:self]; + [[self onMainThread] updateWindowTitle:self]; // dealloc spfSession data SPClear(spfSession); |