Revision: 14330
          http://sourceforge.net/p/skim-app/code/14330
Author:   hofman
Date:     2024-06-11 15:02:25 +0000 (Tue, 11 Jun 2024)
Log Message:
-----------
use different variable

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2024-06-11 14:39:52 UTC (rev 14329)
+++ trunk/SKMainWindowController.m      2024-06-11 15:02:25 UTC (rev 14330)
@@ -2325,19 +2325,17 @@
     
     NSImage *image;
     BOOL isVisible = [self rightSidePaneIsOpen] && [self rightSidePaneState] 
== SKSidePaneStateSnapshot;
-    BOOL needsUpdate = NO;
+    CGFloat scale = [[self window] backingScaleFactor];
     
-    if (isVisible && openType == SKSnapshotOpenNormal) {
-        image = [[controller currentConfiguration] 
thumbnailWithSize:snapshotCacheSize scale:[[self window] backingScaleFactor]];
-    } else {
-        image = [controller placeholderThumbnailWithSize:snapshotCacheSize 
scale:[[self window] backingScaleFactor]];
-        needsUpdate = YES;
-    }
+    if (isVisible && openType == SKSnapshotOpenNormal)
+        image = [[controller currentConfiguration] 
thumbnailWithSize:snapshotCacheSize scale:scale];
+    else
+        image = [controller placeholderThumbnailWithSize:snapshotCacheSize 
scale:scale];
     
     [image setAccessibilityDescription:[NSString 
stringWithFormat:NSLocalizedString(@"Page %@", @""), [controller pageLabel]]];
     [controller setThumbnail:image];
     
-    if (needsUpdate)
+    if (isVisible == NO || openType != SKSnapshotOpenNormal)
         [self snapshotNeedsUpdate:controller placeholder:YES];
     
     if (openType == SKSnapshotOpenFromSetup) {
@@ -2348,9 +2346,9 @@
         [self insertObject:controller inSnapshotsAtIndex:[snapshots count]];
         NSUInteger row = [[rightSideController.snapshotArrayController 
arrangedObjects] indexOfObject:controller];
         if (row != NSNotFound) {
-            NSTableViewAnimationOptions options = 
NSTableViewAnimationEffectGap | NSTableViewAnimationSlideDown;
-            if (isVisible == NO || [NSView shouldShowSlideAnimation] == NO)
-                options = NSTableViewAnimationEffectNone;
+            NSTableViewAnimationOptions options = 
NSTableViewAnimationEffectNone;
+            if (isVisible && [NSView shouldShowSlideAnimation])
+                options = NSTableViewAnimationEffectGap | 
NSTableViewAnimationSlideDown;
             [rightSideController.snapshotTableView 
insertRowsAtIndexes:[NSIndexSet indexSetWithIndex:row] withAnimation:options];
         }
         [rightSideController.snapshotTableView endUpdates];

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

Reply via email to