Revision: 13557
http://sourceforge.net/p/skim-app/code/13557
Author: hofman
Date: 2023-08-03 17:48:54 +0000 (Thu, 03 Aug 2023)
Log Message:
-----------
pass through revertDocument action and validation to super when we don't handle
it
Modified Paths:
--------------
trunk/SKMainDocument.m
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2023-08-03 16:28:46 UTC (rev 13556)
+++ trunk/SKMainDocument.m 2023-08-03 17:48:54 UTC (rev 13557)
@@ -1382,7 +1382,9 @@
}
}
}];
- }
+ } else {
+ [super revertDocumentToSaved:sender];
+ }
}
}
@@ -1394,8 +1396,10 @@
if ([anItem action] == @selector(revertDocumentToSaved:)) {
if ([self fileURL] == nil || [[self fileURL]
checkResourceIsReachableAndReturnError:NULL] == NO)
return NO;
- return [self isDocumentEdited] || [fileUpdateChecker
fileChangedOnDisk] ||
- NSOrderedAscending == [[self fileModificationDate]
compare:[[[NSFileManager defaultManager] attributesOfItemAtPath:[[self fileURL]
path] error:NULL] fileModificationDate]];
+ if ([self isDocumentEdited] || [fileUpdateChecker fileChangedOnDisk] ||
+ NSOrderedAscending == [[self fileModificationDate]
compare:[[[NSFileManager defaultManager] attributesOfItemAtPath:[[self fileURL]
path] error:NULL] fileModificationDate]])
+ return YES;
+ return [super validateUserInterfaceItem:anItem];
} else if ([anItem action] == @selector(printDocument:)) {
return [[self pdfDocument] allowsPrinting];
} else if ([anItem action] == @selector(convertNotes:)) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit