Revision: 3899
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3899&view=rev
Author:   hofman
Date:     2008-05-19 03:17:53 -0700 (Mon, 19 May 2008)

Log Message:
-----------
Reset file update flag when revert succeeded, rather than when it failed. 
Avoids reverting twice for the same file update.

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

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2008-05-19 09:26:09 UTC (rev 3898)
+++ trunk/SKPDFDocument.m       2008-05-19 10:17:53 UTC (rev 3899)
@@ -1161,11 +1161,10 @@
         
         [[alert window] orderOut:nil];
         
-        if ([self revertToContentsOfURL:[self fileURL] ofType:[self fileType] 
error:&error] == NO && error) {
-            [self presentError:error modalForWindow:[self windowForSheet] 
delegate:nil didPresentSelector:NULL contextInfo:NULL];
+        if ([self revertToContentsOfURL:[self fileURL] ofType:[self fileType] 
error:&error])
             receivedFileUpdateNotification = NO;
-            isUpdatingFile = NO;
-        }
+        else if (error)
+            [self presentError:error modalForWindow:[self windowForSheet] 
delegate:nil didPresentSelector:NULL contextInfo:NULL];
         if (returnCode == NSAlertAlternateReturn)
             autoUpdate = YES;
         disableAutoReload = NO;
@@ -1190,7 +1189,6 @@
             
             // check for attached sheet, since reloading the document while an 
alert is up looks a bit strange
             if ([[self windowForSheet] attachedSheet]) {
-                receivedFileUpdateNotification = YES;
                 [[NSNotificationCenter defaultCenter] addObserver:self 
selector:@selector(handleWindowDidEndSheetNotification:) 
                                                              
name:NSWindowDidEndSheetNotification object:[self windowForSheet]];
                 return;


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to