aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-04-05 20:01:17 +0200
committerMax <post@wickenrode.com>2015-04-05 20:01:17 +0200
commitf03de6f42b1ea00875f9d57accbee2537604ee39 (patch)
tree299541920f1bd665ff40a185677dab718ac82de9 /Source
parent66acdbe3e5ad2f20815861a725d95f572c892956 (diff)
downloadsequelpro-f03de6f42b1ea00875f9d57accbee2537604ee39.tar.gz
sequelpro-f03de6f42b1ea00875f9d57accbee2537604ee39.tar.bz2
sequelpro-f03de6f42b1ea00875f9d57accbee2537604ee39.zip
Fix a threading issue when adding tables
(Also the localizations should now work again on 10.10 🎉)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPDatabaseViewController.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/SPDatabaseViewController.m b/Source/SPDatabaseViewController.m
index c43761d3..ea2186cc 100644
--- a/Source/SPDatabaseViewController.m
+++ b/Source/SPDatabaseViewController.m
@@ -116,16 +116,17 @@
#pragma mark -
#pragma mark Tab view control and delegate methods
+//WARNING: Might be called from code in background threads
- (IBAction)viewStructure:(id)sender
{
// Cancel the selection if currently editing a view and unable to save
if (![self couldCommitCurrentViewActions]) {
- [mainToolbar setSelectedItemIdentifier:*SPViewModeToMainToolbarMap[[prefs integerForKey:SPLastViewMode]]];
+ [[mainToolbar onMainThread] setSelectedItemIdentifier:*SPViewModeToMainToolbarMap[[prefs integerForKey:SPLastViewMode]]];
return;
}
- [tableTabView selectTabViewItemAtIndex:0];
- [mainToolbar setSelectedItemIdentifier:SPMainToolbarTableStructure];
+ [[tableTabView onMainThread] selectTabViewItemAtIndex:0];
+ [[mainToolbar onMainThread] setSelectedItemIdentifier:SPMainToolbarTableStructure];
[spHistoryControllerInstance updateHistoryEntries];
[prefs setInteger:SPStructureViewMode forKey:SPLastViewMode];