Turn printDoc into local state

This commit is contained in:
Matthias Neeracher 2011-09-04 02:06:12 +02:00
parent fba1d2c9f6
commit 37945f0be1
2 changed files with 2 additions and 5 deletions

View File

@ -15,7 +15,6 @@
@class VLSheetWindow; @class VLSheetWindow;
@class VLPDFWindow; @class VLPDFWindow;
@class VLLogWindow; @class VLLogWindow;
@class PDFDocument;
#define VLBIABType @"VLBIABType" #define VLBIABType @"VLBIABType"
#define VLNativeType @"org.aereperennius.vocaleasel-song" #define VLNativeType @"org.aereperennius.vocaleasel-song"
@ -65,7 +64,6 @@ enum {
VLLogWindow * logWin; VLLogWindow * logWin;
VLPDFWindow * pdfWin; VLPDFWindow * pdfWin;
VLKeyValueUndo* undo; VLKeyValueUndo* undo;
PDFDocument * printDoc;
NSRange previewRange; NSRange previewRange;
float playRate; float playRate;
float baseTempo; float baseTempo;

View File

@ -119,7 +119,6 @@
@"", @"songGroove", @"", @"songGroove",
@"", @"songTempo", @"", @"songTempo",
nil]]; nil]];
printDoc = nil;
} }
return self; return self;
} }
@ -612,8 +611,8 @@
error:(NSError **)outError error:(NSError **)outError
{ {
[self createTmpFileWithExtension:@"pdf" ofType:VLPDFType]; [self createTmpFileWithExtension:@"pdf" ofType:VLPDFType];
PDFDocument * printDoc = [[PDFDocument alloc] initWithURL:[self fileURLWithExtension:@"pdf"]];
[printDoc autorelease]; [printDoc autorelease];
printDoc = [[PDFDocument alloc] initWithURL:[self fileURLWithExtension:@"pdf"]];
NSPrintOperation *printOperation = [printDoc getPrintOperationForPrintInfo:[self printInfo] autoRotate:NO]; NSPrintOperation *printOperation = [printDoc getPrintOperationForPrintInfo:[self printInfo] autoRotate:NO];