Revision: 3154
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3154&view=rev
Author:   hofman
Date:     2007-11-05 02:19:53 -0800 (Mon, 05 Nov 2007)

Log Message:
-----------
Delay undirtying of document on Leopard.

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2007-11-05 09:50:55 UTC (rev 3153)
+++ trunk/SKMainWindowController.m      2007-11-05 10:19:53 UTC (rev 3154)
@@ -1566,7 +1566,7 @@
     NSUndoManager *undoManager = [[self document] undoManager];
     [[undoManager prepareWithInvocationTarget:self] rotatePageAtIndex:index 
by:-rotation];
     [undoManager setActionName:NSLocalizedString(@"Rotate Page", @"Undo action 
name")];
-    [[self document] updateChangeCount:[undoManager isUndoing] ? NSChangeDone 
: NSChangeUndone];
+    [[self document] undoableActionDoesntDirtyDocument];
     
     PDFPage *page = [[pdfView document] pageAtIndex:index];
     [page setRotation:[page rotation] + rotation];
@@ -1587,7 +1587,7 @@
     NSUndoManager *undoManager = [[self document] undoManager];
     [[undoManager prepareWithInvocationTarget:self] rotateAllLeft:nil];
     [undoManager setActionName:NSLocalizedString(@"Rotate", @"Undo action 
name")];
-    [[self document] updateChangeCount:[undoManager isUndoing] ? NSChangeDone 
: NSChangeUndone];
+    [[self document] undoableActionDoesntDirtyDocument];
     
     int i, count = [[pdfView document] pageCount];
     for (i = 0; i < count; i++) {
@@ -1602,7 +1602,7 @@
     NSUndoManager *undoManager = [[self document] undoManager];
     [[undoManager prepareWithInvocationTarget:self] rotateAllRight:nil];
     [undoManager setActionName:NSLocalizedString(@"Rotate", @"Undo action 
name")];
-    [[self document] updateChangeCount:[undoManager isUndoing] ? NSChangeDone 
: NSChangeUndone];
+    [[self document] undoableActionDoesntDirtyDocument];
     
     int i, count = [[pdfView document] pageCount];
     for (i = 0; i < count; i++) {
@@ -1618,7 +1618,7 @@
     NSUndoManager *undoManager = [[self document] undoManager];
     [[undoManager prepareWithInvocationTarget:self] cropPageAtIndex:index 
toRect:oldRect];
     [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action 
name")];
-    [[self document] updateChangeCount:[undoManager isUndoing] ? NSChangeDone 
: NSChangeUndone];
+    [[self document] undoableActionDoesntDirtyDocument];
     
     PDFPage *page = [[pdfView document] pageAtIndex:index];
     rect = NSIntersectionRect(rect, [page 
boundsForBox:kPDFDisplayBoxMediaBox]);
@@ -1652,7 +1652,7 @@
     NSUndoManager *undoManager = [[self document] undoManager];
     [[undoManager prepareWithInvocationTarget:self] cropPagesToRects:oldRects];
     [undoManager setActionName:NSLocalizedString(@"Crop", @"Undo action 
name")];
-    [[self document] updateChangeCount:[undoManager isUndoing] ? NSChangeDone 
: NSChangeUndone];
+    [[self document] undoableActionDoesntDirtyDocument];
     
     [[NSNotificationCenter defaultCenter] 
postNotificationName:SKPDFDocumentPageBoundsDidChangeNotification 
             object:[pdfView document] userInfo:[NSDictionary 
dictionaryWithObjectsAndKeys:@"crop", @"action", nil]];


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to