Skip to content


Browse files Browse the repository at this point in the history
Fix a threading issue when adding tables
(Also the localizations should now work again on 10.10 πŸŽ‰)
  • Loading branch information
dmoagx committed Apr 5, 2015
1 parent 66acdbe commit f03de6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/SPDatabaseViewController.m
Expand Up @@ -116,16 +116,17 @@ - (BOOL)statusLoaded
#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]]];

[tableTabView selectTabViewItemAtIndex:0];
[mainToolbar setSelectedItemIdentifier:SPMainToolbarTableStructure];
[[tableTabView onMainThread] selectTabViewItemAtIndex:0];
[[mainToolbar onMainThread] setSelectedItemIdentifier:SPMainToolbarTableStructure];
[spHistoryControllerInstance updateHistoryEntries];

[prefs setInteger:SPStructureViewMode forKey:SPLastViewMode];
Expand Down

0 comments on commit f03de6f

Please sign in to comment.