aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-13 14:26:35 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-13 14:26:35 +0000
commit710c28ff5d55ccb26b362d80e866d53d2a4583ad (patch)
tree7a7624beac3623826547c427d639589cb993d23c /Source/CMTextView.m
parent79b24a37b45ad20b8086e481696c758a76092c4e (diff)
downloadsequelpro-710c28ff5d55ccb26b362d80e866d53d2a4583ad.tar.gz
sequelpro-710c28ff5d55ccb26b362d80e866d53d2a4583ad.tar.bz2
sequelpro-710c28ff5d55ccb26b362d80e866d53d2a4583ad.zip
• fixed printing of Extended Table Info if Create Table Syntax view has focus
- regardless of focus it prints the table info sheet - only if user selects something then the create syntax will be printed
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index d65e2c9d..045c8ab6 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -811,6 +811,13 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
- (IBAction)printDocument:(id)sender
{
+ // If Extended Table Info tab is active delegate the print call to the SPPrintController
+ // if the user doesn't select anything in self
+ if([[[[self delegate] class] description] isEqualToString:@"SPExtendedTableInfo"] && ![self selectedRange].length) {
+ [[[self delegate] valueForKeyPath:@"tableDocumentInstance"] printDocument:sender];
+ return;
+ }
+
// This will scale the view to fit the page without centering it.
[[NSPrintInfo sharedPrintInfo] setHorizontalPagination:NSFitPagination];
[[NSPrintInfo sharedPrintInfo] setHorizontallyCentered:NO];
@@ -1861,7 +1868,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
return;
}
if([charactersIgnMod isEqualToString:@"0"]) { // reset font to default
+ BOOL editableStatus = [self isEditable];
+ [self setEditable:YES];
[self setFont:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorFont]]];
+ [self setEditable:editableStatus];
return;
}
}