From a9c1491df9b9fc7af0d803f54a5f3e059740834e Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sat, 13 Mar 2010 23:32:38 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20printDocument=20validation=20if=20C?= =?UTF-8?q?ustom=20Query=20is=20active=20-=20allow=20to=20print=20the=20Cu?= =?UTF-8?q?stom=20Query=20result=20table=20even=20if=20no=20database/table?= =?UTF-8?q?=20is=20selected?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableDocument.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source') diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 87131aee..3a4416c7 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -2983,11 +2983,11 @@ } 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 + return (([self database] != nil && [[tablesListInstance valueForKeyPath:@"tablesListView"] numberOfSelectedRows] == 1) + // if Custom Query Tab is active the textView will handle printDocument by itself + // if it is first responder; otherwise allow to print the Query Result table even + //if no db/table is selected + || [tableTabView indexOfTabViewItem:[tableTabView selectedTabViewItem]] == 2 ); } -- cgit v1.2.3