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

View File

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