diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-13 19:32:15 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-13 19:32:15 +0000 |
commit | 4b13d761590d65d2b294aaa6c17654edbd0a811e (patch) | |
tree | 216799350537a2689dd314b5ba068870c3f98f29 /Source/TableDocument.m | |
parent | 34e9b74b66e82276516881254bea4611a87cea1d (diff) | |
download | sequelpro-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.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:)) { |