Revision: 15564
http://sourceforge.net/p/skim-app/code/15564
Author: hofman
Date: 2025-06-29 16:06:55 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
begin modal session only for applying the reverted data, it is not needed when
reading the data
Modified Paths:
--------------
trunk/SKMainDocument.m
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2025-06-29 15:52:06 UTC (rev 15563)
+++ trunk/SKMainDocument.m 2025-06-29 16:06:55 UTC (rev 15564)
@@ -1015,9 +1015,13 @@
}
- (BOOL)revertToContentsOfURL:(NSURL *)absoluteURL ofType:(NSString *)typeName
error:(NSError **)outError{
+
+ if (NO == [super revertToContentsOfURL:absoluteURL ofType:typeName
error:outError])
+ return NO;
+
NSWindow *primaryWindow = [[self primaryWindowController] window];
NSWindow *modalwindow = nil;
- NSModalSession session;
+ NSModalSession session = nil;
if ([primaryWindow attachedSheet] == nil && [primaryWindow isMainWindow]) {
modalwindow = [[SKAnimatedBorderlessWindow alloc]
initWithContentRect:NSZeroRect];
@@ -1026,22 +1030,16 @@
[(SKApplication *)NSApp setUserAttentionDisabled:NO];
}
- BOOL success = [super revertToContentsOfURL:absoluteURL ofType:typeName
error:outError];
+ [self setDataFromTmpData];
+ [[self undoManager] removeAllActions];
+ [fileUpdateChecker reset];
- if (success) {
- [self setDataFromTmpData];
- [[self undoManager] removeAllActions];
- [fileUpdateChecker reset];
- } else {
- tmpData = nil;
- }
-
if (modalwindow) {
[NSApp endModalSession:session];
[modalwindow orderOut:nil];
}
- return success;
+ return YES;
}
#pragma mark Printing
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