From 710c28ff5d55ccb26b362d80e866d53d2a4583ad Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sat, 13 Mar 2010 14:26:35 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20printing=20of=20Extended=20Table=20?= =?UTF-8?q?Info=20if=20Create=20Table=20Syntax=20view=20has=20focus=20-=20?= =?UTF-8?q?regardless=20of=20focus=20it=20prints=20the=20table=20info=20sh?= =?UTF-8?q?eet=20-=20only=20if=20user=20selects=20something=20then=20the?= =?UTF-8?q?=20create=20syntax=20will=20be=20printed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CMTextView.m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Source/CMTextView.m') 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; } } -- cgit v1.2.3