diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 7585ed34..cd83f007 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -607,7 +607,14 @@ NSString *TableDocumentFavoritesControllerFavoritesDidChange = @"TableDocumentFa */ - (void)toggleConsole:(id)sender { - [[[SPQueryConsole sharedQueryConsole] window] setIsVisible:![[[SPQueryConsole sharedQueryConsole] window] isVisible]]; + BOOL isConsoleVisible = [[[SPQueryConsole sharedQueryConsole] window] isVisible]; + + [[[SPQueryConsole sharedQueryConsole] window] setIsVisible:(!isConsoleVisible)]; + + // Only update the menu item title if its the menu item and not the toolbar + if ([sender isKindOfClass:[NSMenuItem class]]) { + [(NSMenuItem *)sender setTitle:(!isConsoleVisible) ? NSLocalizedString(@"Hide Console", @"Hide Console") : NSLocalizedString(@"Show Console", @"Show Console")]; + } } /** |