aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-13 23:32:38 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-13 23:32:38 +0000
commita9c1491df9b9fc7af0d803f54a5f3e059740834e (patch)
treecb4ab3e323299f97052789e1331b8ad3b19eb954
parent81fc38c7e47a8e539662c80ac065f2c4f413479a (diff)
downloadsequelpro-a9c1491df9b9fc7af0d803f54a5f3e059740834e.tar.gz
sequelpro-a9c1491df9b9fc7af0d803f54a5f3e059740834e.tar.bz2
sequelpro-a9c1491df9b9fc7af0d803f54a5f3e059740834e.zip
• fixed printDocument validation if Custom Query is active
- allow to print the Custom Query result table even if no database/table is selected
-rw-r--r--Source/TableDocument.m10
1 files changed, 5 insertions, 5 deletions
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
);
}