Revision: 14319
http://sourceforge.net/p/skim-app/code/14319
Author: hofman
Date: 2024-06-08 22:34:40 +0000 (Sat, 08 Jun 2024)
Log Message:
-----------
single call to update snapshot thumbnail
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2024-06-08 22:00:36 UTC (rev 14318)
+++ trunk/SKMainWindowController.m 2024-06-08 22:34:40 UTC (rev 14319)
@@ -2325,19 +2325,24 @@
NSImage *image;
BOOL isVisible = [self rightSidePaneIsOpen] && [self rightSidePaneState]
== SKSidePaneStateSnapshot;
+ BOOL needsUpdate = NO;
- if (isVisible && openType == SKSnapshotOpenNormal)
+ if (isVisible && openType == SKSnapshotOpenNormal) {
image = [[controller currentConfiguration]
thumbnailWithSize:snapshotCacheSize scale:[[self window] backingScaleFactor]];
- else
+ } else {
image = [controller placeholderThumbnailWithSize:snapshotCacheSize
scale:[[self window] backingScaleFactor]];
+ needsUpdate = YES;
+ }
[image setAccessibilityDescription:[NSString
stringWithFormat:NSLocalizedString(@"Page %@", @""), [controller pageLabel]]];
[controller setThumbnail:image];
+ if (needsUpdate)
+ [self snapshotNeedsUpdate:controller];
+
if (openType == SKSnapshotOpenFromSetup) {
[self insertObject:controller inSnapshotsAtIndex:[snapshots count]];
[rightSideController.snapshotTableView reloadData];
- [self snapshotNeedsUpdate:controller];
} else {
[rightSideController.snapshotTableView beginUpdates];
[self insertObject:controller inSnapshotsAtIndex:[snapshots count]];
@@ -2350,8 +2355,6 @@
}
[rightSideController.snapshotTableView endUpdates];
[self setRecentInfoNeedsUpdate:YES];
- if (isVisible == NO)
- [self snapshotNeedsUpdate:controller];
}
}
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