diff options
author | Max Lohrmann <dmoagx@users.noreply.github.com> | 2017-11-11 22:32:43 +0100 |
---|---|---|
committer | Max Lohrmann <dmoagx@users.noreply.github.com> | 2017-11-11 22:32:43 +0100 |
commit | 6734907374aef150f53e65b81f0fc2b43a8a54f7 (patch) | |
tree | 24388084267dabb47f735a11882c8c77089dd0be /Source | |
parent | 273bd3720a857e4b886aa81b561854c250ea20e7 (diff) | |
download | sequelpro-6734907374aef150f53e65b81f0fc2b43a8a54f7.tar.gz sequelpro-6734907374aef150f53e65b81f0fc2b43a8a54f7.tar.bz2 sequelpro-6734907374aef150f53e65b81f0fc2b43a8a54f7.zip |
Fix a case of "background thread updating UI" (#2916)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPExtendedTableInfo.m | 2 | ||||
-rw-r--r-- | Source/SPPrintController.m | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index dc311bdf..35a102a9 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -437,6 +437,8 @@ static NSString *SPMySQLCommentField = @"Comment"; /** * Returns a dictionary describing the information of the table to be used for printing purposes. + * + * MUST BE CALLED ON THE UI THREAD! */ - (NSDictionary *)tableInformationForPrinting { diff --git a/Source/SPPrintController.m b/Source/SPPrintController.m index d0feec68..8b17e5bf 100644 --- a/Source/SPPrintController.m +++ b/Source/SPPrintController.m @@ -364,7 +364,7 @@ NSString *heading = NSLocalizedString(@"Table Information", @"table information print heading"); [engine setObject:connection forKey:@"c"]; - [engine setObject:[extendedTableInfoInstance tableInformationForPrinting] forKey:@"i"]; + [engine setObject:[[extendedTableInfoInstance onMainThread] tableInformationForPrinting] forKey:@"i"]; [printData setObject:heading forKey:@"heading"]; [printData setObject:[[NSUnarchiver unarchiveObjectWithData:[prefs objectForKey:SPCustomQueryEditorFont]] fontName] forKey:@"font"]; |