From 37945f0be15894b34b890b0f769dc5a5b8571d57 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 4 Sep 2011 02:06:12 +0200 Subject: [PATCH] Turn printDoc into local state --- Sources/VLDocument.h | 2 -- Sources/VLDocument.mm | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Sources/VLDocument.h b/Sources/VLDocument.h index fa6ae3b..00feb3d 100644 --- a/Sources/VLDocument.h +++ b/Sources/VLDocument.h @@ -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; diff --git a/Sources/VLDocument.mm b/Sources/VLDocument.mm index 9fdf04a..0372b37 100644 --- a/Sources/VLDocument.mm +++ b/Sources/VLDocument.mm @@ -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];