Revision: 30097
          http://sourceforge.net/p/bibdesk/svn/30097
Author:   hofman
Date:     2026-03-03 17:08:56 +0000 (Tue, 03 Mar 2026)
Log Message:
-----------
separate method to update pregress indicators

Modified Paths:
--------------
    trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m

Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2026-03-03 
16:56:55 UTC (rev 30096)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m      2026-03-03 
17:08:56 UTC (rev 30097)
@@ -1768,13 +1768,24 @@
 }
 
 - (void)_updateProgressIndicatorFrames {
-    if ([_progressIndicators count] > 0) {
-        [_progressIndicators enumerateKeysAndObjectsUsingBlock:^(NSURL *url, 
FVProgressIndicator *progressIndicator, BOOL *stop){
-            [progressIndicator setFrame:[self 
_rectOfProgressIndicatorForIconAtIndex:[progressIndicator indexInView]]];
-        }];
-    }
+    [_progressIndicators enumerateKeysAndObjectsUsingBlock:^(NSURL *url, 
FVProgressIndicator *progressIndicator, BOOL *stop){
+        [progressIndicator setFrame:[self 
_rectOfProgressIndicatorForIconAtIndex:[progressIndicator indexInView]]];
+    }];
 }
 
+- (void)_updateProgressIndicatorIndexes {
+    [_progressIndicators enumerateKeysAndObjectsUsingBlock:^(NSURL *url, 
FVProgressIndicator *progressIndicator, BOOL *stop){
+        NSUInteger anIndex = [progressIndicator indexInView];
+        if ([_orderedURLs containsObject:url] == NO) {
+            [self removeProgressIndicatorForURL:url atIndex:anIndex];
+        } else if (anIndex >= [self numberOfIcons] || [[self 
URLAtIndex:anIndex] isEqual:url] == NO) {
+            anIndex = [_orderedURLs indexOfObject:url];
+            [progressIndicator setIndexInView:anIndex];
+            // frame will be updated from _resetViewLayout
+        }
+    }];
+}
+
 - (void)_resetViewLayout;
 {
     // When the tracking rects are active while the view is layed out, 
mouseEntered may be called even if the mouse does not move.  So we remove them 
before doing the layout.  We will reinstall them at the end of this method.
@@ -1967,18 +1978,7 @@
         [self _updatePreviewer];
     }
     
-    if ([_progressIndicators count] > 0) {
-        [_progressIndicators enumerateKeysAndObjectsUsingBlock:^(NSURL *url, 
FVProgressIndicator *progressIndicator, BOOL *stop){
-            NSUInteger anIndex = [progressIndicator indexInView];
-            if ([_orderedURLs containsObject:url] == NO) {
-                [self removeProgressIndicatorForURL:url atIndex:anIndex];
-            } else if (anIndex >= [self numberOfIcons] || [[self 
URLAtIndex:anIndex] isEqual:url] == NO) {
-                anIndex = [_orderedURLs indexOfObject:url];
-                [progressIndicator setIndexInView:anIndex];
-                [progressIndicator setFrame:[self 
_rectOfProgressIndicatorForIconAtIndex:anIndex]];
-            }
-        }];
-    }
+    [self _updateProgressIndicatorIndexes];
     
     [self _resetViewLayout];
     

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to