File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -6303,22 +6303,24 @@ - (void)_selectDatabaseAndItem:(NSDictionary *)selectionDetails
6303
6303
6304
6304
#ifndef SP_CODA /* update selected table in SPTablesList */
6305
6305
6306
- BOOL focusOnFilter = YES;
6307
- if (targetItemName) focusOnFilter = NO;
6308
-
6309
- // If a the table has changed, update the selection
6310
- if (![targetItemName isEqualToString:[self table]] && targetItemName) {
6311
- focusOnFilter = ![tablesListInstance selectItemWithName:targetItemName];
6312
- }
6313
-
6314
- // Ensure the window focus is on the table list or the filter as appropriate
6315
- [[tablesListInstance onMainThread] setTableListSelectability:YES];
6316
- if (focusOnFilter) {
6317
- [[tablesListInstance onMainThread] makeTableListFilterHaveFocus];
6318
- } else {
6319
- [[tablesListInstance onMainThread] makeTableListHaveFocus];
6320
- }
6321
- [[tablesListInstance onMainThread] setTableListSelectability:NO];
6306
+ SPMainQSync(^{
6307
+ BOOL focusOnFilter = YES;
6308
+ if (targetItemName) focusOnFilter = NO;
6309
+
6310
+ // If a the table has changed, update the selection
6311
+ if (![targetItemName isEqualToString:[self table]] && targetItemName) {
6312
+ focusOnFilter = ![tablesListInstance selectItemWithName:targetItemName];
6313
+ }
6314
+
6315
+ // Ensure the window focus is on the table list or the filter as appropriate
6316
+ [tablesListInstance setTableListSelectability:YES];
6317
+ if (focusOnFilter) {
6318
+ [tablesListInstance makeTableListFilterHaveFocus];
6319
+ } else {
6320
+ [tablesListInstance makeTableListHaveFocus];
6321
+ }
6322
+ [tablesListInstance setTableListSelectability:NO];
6323
+ });
6322
6324
6323
6325
#endif
6324
6326
[self endTask];
You can’t perform that action at this time.
0 commit comments