Revision: 7410
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7410&view=rev
Author:   hofman
Date:     2011-08-01 09:50:10 +0000 (Mon, 01 Aug 2011)

Log Message:
-----------
Really always save the original data in PDF document, also when it's a PDF.

Modified Paths:
--------------
    trunk/SKMainDocument.m

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2011-08-01 09:35:19 UTC (rev 7409)
+++ trunk/SKMainDocument.m      2011-08-01 09:50:10 UTC (rev 7410)
@@ -673,24 +673,23 @@
 }
 
 - (BOOL)readFromData:(NSData *)data ofType:(NSString *)docType error:(NSError 
**)outError {
+    NSData *inData = data;
     PDFDocument *pdfDoc = nil;
     NSError *error = nil;
     
     [tmpData release];
     tmpData = [[SKTemporaryData alloc] init];
     
-    if ([docType isEqualToString:SKPostScriptDocumentType]) {
-        [self setOriginalData:data];
+    if ([docType isEqualToString:SKPostScriptDocumentType])
         data = [[SKConversionProgressController 
newPDFDataWithPostScriptData:data error:&error] autorelease];
-    }
     
     if (data)
         pdfDoc = [[SKPDFDocument alloc] initWithData:data];
     
-    [tmpData setPdfDocument:pdfDoc];
-
     if (pdfDoc) {
         [self setPDFData:data];
+        [tmpData setPdfDocument:pdfDoc];
+        [self setOriginalData:inData];
         [pdfDoc release];
         [self updateChangeCount:NSChangeDone];
         return YES;
@@ -808,8 +807,7 @@
             didRead = YES;
             [self setPDFData:data];
             [tmpData setPdfDocument:pdfDoc];
-            if ([docType isEqualToString:SKPostScriptDocumentType] || [docType 
isEqualToString:SKDVIDocumentType] || [docType 
isEqualToString:SKXDVDocumentType])
-                [self setOriginalData:fileData];
+            [self setOriginalData:fileData];
             [pdfDoc release];
             [fileUpdateChecker didUpdateFromURL:absoluteURL];
             


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to