aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m
index 253f54f5..a4f078a3 100644
--- a/Source/TableDocument.m
+++ b/Source/TableDocument.m
@@ -2803,7 +2803,6 @@
*/
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
-
if ([menuItem menu] == chooseDatabaseButton) {
return (_isConnected && databaseListIsSelectable);
}
@@ -2908,6 +2907,11 @@
if ([menuItem action] == @selector(toggleConsole:)) {
[menuItem setTitle:([[[SPQueryController sharedQueryController] window] isVisible]) ? NSLocalizedString(@"Hide Console", @"hide console") : NSLocalizedString(@"Show Console", @"show console")];
}
+
+ // Clear console
+ if ([menuItem action] == @selector(clearConsole:)) {
+ return ([[SPQueryController sharedQueryController] consoleMessageCount] > 0);
+ }
return [super validateMenuItem:menuItem];
}