Skip to content

Commit 6734907

Browse files
committed
Fix a case of "background thread updating UI" (#2916)
1 parent 273bd37 commit 6734907

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Source/SPExtendedTableInfo.m

+2
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ - (void)loadTable:(NSString *)table
437437

438438
/**
439439
* Returns a dictionary describing the information of the table to be used for printing purposes.
440+
*
441+
* MUST BE CALLED ON THE UI THREAD!
440442
*/
441443
- (NSDictionary *)tableInformationForPrinting
442444
{

Source/SPPrintController.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ - (void)generateTableInfoHTMLForPrinting
364364
NSString *heading = NSLocalizedString(@"Table Information", @"table information print heading");
365365

366366
[engine setObject:connection forKey:@"c"];
367-
[engine setObject:[extendedTableInfoInstance tableInformationForPrinting] forKey:@"i"];
367+
[engine setObject:[[extendedTableInfoInstance onMainThread] tableInformationForPrinting] forKey:@"i"];
368368

369369
[printData setObject:heading forKey:@"heading"];
370370
[printData setObject:[[NSUnarchiver unarchiveObjectWithData:[prefs objectForKey:SPCustomQueryEditorFont]] fontName] forKey:@"font"];

0 commit comments

Comments
 (0)