Revision: 16287
          http://sourceforge.net/p/skim-app/code/16287
Author:   hofman
Date:     2026-05-12 09:25:06 +0000 (Tue, 12 May 2026)
Log Message:
-----------
don't use as much convenience method to note rowheight changes for more 
specific application

Modified Paths:
--------------
    trunk/SKMainWindowController.m
    trunk/SKMainWindowController_UI.m
    trunk/SKTableView.h
    trunk/SKTableView.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-05-11 21:34:00 UTC (rev 16286)
+++ trunk/SKMainWindowController.m      2026-05-12 09:25:06 UTC (rev 16287)
@@ -2653,10 +2653,10 @@
             }
         } else if ([keyPath isEqualToString:SKThumbnailSizeKey]) {
             [self resetThumbnailSizeIfNeeded];
-            [leftSideController.thumbnailTableView 
noteHeightOfRowsChangedAnimating:YES];
+            [leftSideController.thumbnailTableView noteHeightOfRowsChanged];
         } else if ([keyPath isEqualToString:SKSnapshotThumbnailSizeKey]) {
             [self resetSnapshotSizeIfNeeded];
-            [rightSideController.snapshotTableView 
noteHeightOfRowsChangedAnimating:YES];
+            [rightSideController.snapshotTableView noteHeightOfRowsChanged];
         } else if ([keyPath isEqualToString:SKInterpolationQualityKey]) {
             [pdfView setInterpolationQuality:[[NSUserDefaults 
standardUserDefaults] integerForKey:SKInterpolationQualityKey]];
             [secondaryPdfView setInterpolationQuality:[[NSUserDefaults 
standardUserDefaults] integerForKey:SKInterpolationQualityKey]];

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2026-05-11 21:34:00 UTC (rev 16286)
+++ trunk/SKMainWindowController_UI.m   2026-05-12 09:25:06 UTC (rev 16287)
@@ -570,15 +570,22 @@
     if ([tcID isEqualToString:IMAGE_COLUMNID]) {
         SKTableView *tv = [aNotification object];
         if ([tv isEqual:leftSideController.thumbnailTableView] || [tv 
isEqual:rightSideController.snapshotTableView]) {
-            [tv noteHeightOfRowsChangedAnimating:NO];
+            [NSAnimationContext beginGrouping];
+            [[NSAnimationContext currentContext] setDuration:0.0];
+            [tv noteHeightOfRowsChanged];
+            [NSAnimationContext endGrouping];
         }
     } else if ([tcID isEqualToString:RESULTS_COLUMNID]) {
         SKTableView *tv = [aNotification object];
-        if ([tv isEqual:leftSideController.findTableView]) {
-            if ([tv inLiveResize])
+        if ([tv isEqual:leftSideController.findTableView] && [tv numberOfRows] 
> 1) {
+            if ([tv inLiveResize]) {
                 mwcFlags.findRowHeightsNeedUpdate = YES;
-            else
-                [tv noteHeightOfRowsChangedAnimating:NO];
+            } else {
+                [NSAnimationContext beginGrouping];
+                [[NSAnimationContext currentContext] setDuration:0.0];
+                [tv noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndexesInRange:NSMakeRange(1, [tv numberOfRows] - 1)]];
+                [NSAnimationContext endGrouping];
+            }
         }
     }
 }

Modified: trunk/SKTableView.h
===================================================================
--- trunk/SKTableView.h 2026-05-11 21:34:00 UTC (rev 16286)
+++ trunk/SKTableView.h 2026-05-12 09:25:06 UTC (rev 16287)
@@ -98,7 +98,7 @@
 
 - (void)reloadTypeSelectStrings;
 
-- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate;
+- (void)noteHeightOfRowsChanged;
 
 @property (nullable, weak) id<SKTableViewDelegate> delegate;
 

Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2026-05-11 21:34:00 UTC (rev 16286)
+++ trunk/SKTableView.m 2026-05-12 09:25:06 UTC (rev 16287)
@@ -246,15 +246,8 @@
     return view;
 }
 
-- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate {
-    if (animate == NO) {
-        [NSAnimationContext beginGrouping];
-        [[NSAnimationContext currentContext] setDuration:0.0];
-    }
+- (void)noteHeightOfRowsChanged {
     [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
-    if (animate == NO) {
-        [NSAnimationContext endGrouping];
-    }
 }
 
 - (void)viewDidMoveToWindow {

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