diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-06-29 12:44:33 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-06-29 12:44:33 +0000 |
commit | 289a0c98b50b6da590b50a14969dfd986bab18c3 (patch) | |
tree | 588b6d7e3249223374400ef0baa8c33dd8c50cf2 /Source/SPHistoryController.m | |
parent | 92fbb6abcc89c946b1565de862b59af016651fdb (diff) | |
download | sequelpro-289a0c98b50b6da590b50a14969dfd986bab18c3.tar.gz sequelpro-289a0c98b50b6da590b50a14969dfd986bab18c3.tar.bz2 sequelpro-289a0c98b50b6da590b50a14969dfd986bab18c3.zip |
• made SP more robust against fast closing of tabs and windows
• setHideForSingleTab:YES after opening spfs session
Diffstat (limited to 'Source/SPHistoryController.m')
-rw-r--r-- | Source/SPHistoryController.m | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m index 9e7f20da..8478c6b4 100644 --- a/Source/SPHistoryController.m +++ b/Source/SPHistoryController.m @@ -93,6 +93,8 @@ if ([history count] && historyPosition > 0) backEnabled = YES; if ([history count] && historyPosition + 1 < [history count]) forwardEnabled = YES; + if(!historyControl) return; + [historyControl setEnabled:backEnabled forSegment:0]; [historyControl setEnabled:forwardEnabled forSegment:1]; @@ -229,7 +231,7 @@ - (void) toolbarWillAddItem:(NSNotification *)aNotification { if ([[[[aNotification userInfo] objectForKey:@"item"] itemIdentifier] isEqualToString:SPMainToolbarHistoryNavigation]) { toolbarItemVisible = YES; - [self performSelector:@selector(updateToolbarItem) withObject:nil afterDelay:0.1]; + [self performSelectorOnMainThread:@selector(updateToolbarItem) withObject:nil waitUntilDone:YES]; } } |