aboutsummaryrefslogtreecommitdiffstats
path: root/Source
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
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')
-rw-r--r--Source/CMTextView.m10
-rw-r--r--Source/TableDump.m2
2 files changed, 11 insertions, 1 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;
}
}
diff --git a/Source/TableDump.m b/Source/TableDump.m
index 78ae1a41..fb42c7f2 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -742,7 +742,7 @@
[tableDocumentInstance setDatabases:self];
// Update current selected database
- [tableDocumentInstance refreshCurrentDatabase];
+ [tableDocumentInstance performSelector:@selector(refreshCurrentDatabase) withObject:nil afterDelay:0.1];
// Update current database tables
[tablesListInstance updateTables:self];