Revision: 22398
          http://sourceforge.net/p/bibdesk/svn/22398
Author:   hofman
Date:     2018-07-10 13:31:43 +0000 (Tue, 10 Jul 2018)
Log Message:
-----------
get flag from loop

Modified Paths:
--------------
    trunk/bibdesk/BibItem.m

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2018-07-10 13:27:22 UTC (rev 22397)
+++ trunk/bibdesk/BibItem.m     2018-07-10 13:31:43 UTC (rev 22398)
@@ -1470,16 +1470,16 @@
         NSArray *localFiles = [self localFiles];
         NSUInteger count = [localFiles count];
         NSArray *fileURLs = [localFiles valueForKey:@"URL"];
-        BOOL hasMissingFile = count && [fileURLs containsObject:[NSNull null]];
         NSDictionary *cellDictionary = nil;
         if (count > 0) {
             NSString *label = 1 == count ? NSLocalizedString(@"1 item", @"") : 
[NSString stringWithFormat:NSLocalizedString(@"%ld items", @""), (long)count];
+            BOOL hasMissingFile = NO;
             BOOL hasSkimNotes = NO;
             for (NSURL *fileURL in fileURLs) {
-                if ([[fileURL SkimNotes] count] > 0) {
+                if ([fileURL isEqual:[NSNull null]])
+                    hasMissingFile == YES;
+                else if (hasSkimNotes == NO && [[fileURL SkimNotes] count] > 0)
                     hasSkimNotes = YES;
-                    break;
-                }
             }
             NSImage *image = hasSkimNotes ? (hasMissingFile ? [NSImage 
redAnnotatedPaperclipImage] : [NSImage annotatedPaperclipImage]) : 
(hasMissingFile ? [NSImage redPaperclipImage] : [NSImage paperclipImage]);
             cellDictionary = [NSDictionary dictionaryWithObjectsAndKeys:image, 
BDSKTextWithIconImageKey, label, BDSKTextWithIconStringKey, nil];

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


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to