diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-10-08 06:17:23 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-10-08 06:17:23 +0000 |
commit | 5759187115c2aaa2db5f528a02bee80ba0980c39 (patch) | |
tree | dacb7eeb79ae7f38c5f3a45f4e672c7c02c6ee11 /Source | |
parent | 88cb14acd9182ac19a1be2e8ad34b2be6b12b939 (diff) | |
download | sequelpro-5759187115c2aaa2db5f528a02bee80ba0980c39.tar.gz sequelpro-5759187115c2aaa2db5f528a02bee80ba0980c39.tar.bz2 sequelpro-5759187115c2aaa2db5f528a02bee80ba0980c39.zip |
• After importing CSV data execute [TableContent reloadTable:] on mainThread to avoid crashes if SP shows the data in the Content Browser in which the data will be imported.
[It occurred sometimes that the current table should be updated but no data were available due to threading.]
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDump.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m index 209cd382..9b75c757 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -1012,8 +1012,10 @@ window:tableWindow notificationName:@"Import Finished"]; - // Update the content view - [tableContentInstance reloadTable:self]; + // Update the content view - do this on the main thread to avoid crashes + // if Content Browser shows the table in which the imported data are loaded + [tableContentInstance performSelectorOnMainThread:@selector(reloadTable:) withObject:nil waitUntilDone:YES]; + } - (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo |