Revision: 16285
          http://sourceforge.net/p/skim-app/code/16285
Author:   hofman
Date:     2026-05-11 21:16:20 +0000 (Mon, 11 May 2026)
Log Message:
-----------
Move noteHeightOfRowsChangedAnimating to note outlineview class. Implement 
single row case directly.

Modified Paths:
--------------
    trunk/SKMainWindowController.m
    trunk/SKNoteOutlineView.h
    trunk/SKNoteOutlineView.m
    trunk/SKOutlineView.h
    trunk/SKOutlineView.m
    trunk/SKTableView.h
    trunk/SKTableView.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKMainWindowController.m      2026-05-11 21:16:20 UTC (rev 16285)
@@ -2826,7 +2826,7 @@
                 if (mwcFlags.autoResizeNoteRows) {
                     NSInteger row = [rightSideController.noteOutlineView 
rowForItem:[keyPath isEqualToString:SKNPDFAnnotationStringKey] ? note : [note 
noteText]];
                     if (row != -1)
-                        [rightSideController.noteOutlineView 
noteHeightOfRowChanged:row animating:YES];
+                        [rightSideController.noteOutlineView 
noteHeightOfRowsWithIndexesChanged:[NSIndexSet indexSetWithIndex:row]];
                 }
             }
             
@@ -2945,7 +2945,7 @@
             [thumbnail setImage:image];
             
             if (sameSize == NO) {
-                [leftSideController.thumbnailTableView 
noteHeightOfRowChanged:[thumbnail pageIndex] animating:YES];
+                [leftSideController.thumbnailTableView 
noteHeightOfRowsWithIndexesChanged:[NSIndexSet indexSetWithIndex:[thumbnail 
pageIndex]]];
                 [self updateOverviewItemSize];
             }
         });
@@ -3091,7 +3091,7 @@
             if (fabs(newSize.width - oldSize.width) > 1.0 || 
fabs(newSize.height - oldSize.height) > 1.0) {
                 NSUInteger idx = [[rightSideController.snapshotArrayController 
arrangedObjects] indexOfObject:controller];
                 if (idx != NSNotFound)
-                    [rightSideController.snapshotTableView 
noteHeightOfRowChanged:idx animating:YES];
+                    [rightSideController.snapshotTableView 
noteHeightOfRowsWithIndexesChanged:[NSIndexSet indexSetWithIndex:idx]];
             }
         });
     });

Modified: trunk/SKNoteOutlineView.h
===================================================================
--- trunk/SKNoteOutlineView.h   2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKNoteOutlineView.h   2026-05-11 21:16:20 UTC (rev 16285)
@@ -53,6 +53,8 @@
 
 @property (nonatomic, readonly, getter=isDropping) BOOL dropping;
 
+- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate;
+
 - (CGFloat)rowHeightForItem:(id)item;
 - (void)setRowHeight:(CGFloat)rowHeight forItem:(id)item;
 - (void)resetRowHeights;

Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m   2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKNoteOutlineView.m   2026-05-11 21:16:20 UTC (rev 16285)
@@ -103,6 +103,17 @@
     return self;
 }
 
+- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate {
+    if (animate == NO) {
+        [NSAnimationContext beginGrouping];
+        [[NSAnimationContext currentContext] setDuration:0.0];
+    }
+    [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
+    if (animate == NO) {
+        [NSAnimationContext endGrouping];
+    }
+}
+
 - (CGFloat)rowHeightForItem:(id)item {
     return (NSInteger)NSMapGet(rowHeights, (__bridge void *)item);
 }
@@ -142,7 +153,10 @@
                         break;
                     CGFloat currentHeight = fmax([self rowHeight], 
round(startHeight + [self convertPoint:[theEvent locationInWindow] 
fromView:nil].y - mouseLoc.y));
                     [self setRowHeight:currentHeight forItem:item];
-                    [self noteHeightOfRowChanged:row animating:NO];
+                    [NSAnimationContext beginGrouping];
+                    [[NSAnimationContext currentContext] setDuration:0.0];
+                    [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndex:row]];
+                    [NSAnimationContext endGrouping];
                 }
                 
                 [NSCursor pop];

Modified: trunk/SKOutlineView.h
===================================================================
--- trunk/SKOutlineView.h       2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKOutlineView.h       2026-05-11 21:16:20 UTC (rev 16285)
@@ -82,9 +82,6 @@
 
 - (void)reloadTypeSelectStrings;
 
-- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate;
-- (void)noteHeightOfRowChanged:(NSInteger)row animating:(BOOL)animate;
-
 @property (nullable, weak) id<SKOutlineViewDelegate> delegate;
 
 @end

Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m       2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKOutlineView.m       2026-05-11 21:16:20 UTC (rev 16285)
@@ -239,28 +239,6 @@
     }
 }
 
-- (void)noteHeightOfRowsChangedAnimating:(BOOL)animate {
-    if (animate == NO) {
-        [NSAnimationContext beginGrouping];
-        [[NSAnimationContext currentContext] setDuration:0.0];
-    }
-    [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndexesInRange:NSMakeRange(0, [self numberOfRows])]];
-    if (animate == NO) {
-        [NSAnimationContext endGrouping];
-    }
-}
-
-- (void)noteHeightOfRowChanged:(NSInteger)row animating:(BOOL)animate {
-    if (animate == NO) {
-        [NSAnimationContext beginGrouping];
-        [[NSAnimationContext currentContext] setDuration:0.0];
-    }
-    [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndex:row]];
-    if (animate == NO) {
-        [NSAnimationContext endGrouping];
-    }
-}
-
 - (id)makeViewWithIdentifier:(NSString *)identifier owner:(id)owner {
     id view = [super makeViewWithIdentifier:identifier owner:owner];
     if (font) {

Modified: trunk/SKTableView.h
===================================================================
--- trunk/SKTableView.h 2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKTableView.h 2026-05-11 21:16:20 UTC (rev 16285)
@@ -99,7 +99,6 @@
 - (void)reloadTypeSelectStrings;
 
 - (void)noteHeightOfRowsChangedAnimating:(BOOL)animate;
-- (void)noteHeightOfRowChanged:(NSInteger)row animating:(BOOL)animate;
 
 @property (nullable, weak) id<SKTableViewDelegate> delegate;
 

Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2026-05-11 15:38:15 UTC (rev 16284)
+++ trunk/SKTableView.m 2026-05-11 21:16:20 UTC (rev 16285)
@@ -257,17 +257,6 @@
     }
 }
 
-- (void)noteHeightOfRowChanged:(NSInteger)row animating:(BOOL)animate {
-    if (animate == NO) {
-        [NSAnimationContext beginGrouping];
-        [[NSAnimationContext currentContext] setDuration:0.0];
-    }
-    [self noteHeightOfRowsWithIndexesChanged:[NSIndexSet 
indexSetWithIndex:row]];
-    if (animate == NO) {
-        [NSAnimationContext endGrouping];
-    }
-}
-
 - (void)viewDidMoveToWindow {
     [super viewDidMoveToWindow];
     if ([self window] == nil)

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