aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDocument.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-13 19:32:15 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-13 19:32:15 +0000
commit4b13d761590d65d2b294aaa6c17654edbd0a811e (patch)
tree216799350537a2689dd314b5ba068870c3f98f29 /Source/TableDocument.m
parent34e9b74b66e82276516881254bea4611a87cea1d (diff)
downloadsequelpro-4b13d761590d65d2b294aaa6c17654edbd0a811e.tar.gz
sequelpro-4b13d761590d65d2b294aaa6c17654edbd0a811e.tar.bz2
sequelpro-4b13d761590d65d2b294aaa6c17654edbd0a811e.zip
tiny improvement for printDocument: menu item validation
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r--Source/TableDocument.m9
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:)) {