diff options
-rw-r--r-- | Source/TableDocument.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index b32cc2bb..d021ae5c 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -2992,8 +2992,13 @@ return ([self database] != nil && [self table] != nil); } - if ([menuItem action] == @selector(printDocument:)) { - return (([self database] != nil) && ([[tablesListInstance valueForKeyPath:@"tablesListView"] numberOfSelectedRows] == 1)); + if ([menuItem action] == @selector(printDocument:)) { + return ( + [self database] != nil + && [[tablesListInstance valueForKeyPath:@"tablesListView"] numberOfSelectedRows] == 1 + // if Custom Query Tab is active the textView will handle printDocument if it's first responder + && [tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]] != 2 + ); } if ([menuItem action] == @selector(chooseEncoding:)) { |