Revision: 22619
          http://sourceforge.net/p/bibdesk/svn/22619
Author:   hofman
Date:     2018-09-16 22:10:17 +0000 (Sun, 16 Sep 2018)
Log Message:
-----------
combine resetting cached metadata for item

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

Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m     2018-09-16 21:18:47 UTC (rev 22618)
+++ trunk/bibdesk/BibItem.m     2018-09-16 22:10:17 UTC (rev 22619)
@@ -3722,12 +3722,21 @@
     BOOL allFieldsChanged = [BDSKAllFieldsString isEqualToString:key];
     
     // invalidate people (authors, editors, etc.) if necessary
+    // invalidate the URLs; they are rebuilt when needed
+    // invalidate the cached groups; they are rebuilt when needed
     if (allFieldsChanged) {
         [[people allValues] setValue:nil forKey:@"publication"];
         [people release];
         people = nil;
-    } else if ([key isPersonField]) {
-        [self rebuildPeopleForField:key];
+        [URLs removeAllObjects];
+        [groups removeAllObjects];
+    }else if(key != nil){
+        if ([key isPersonField]) {
+            [self rebuildPeopleForField:key];
+        } else if([key isURLField]) {
+            [URLs removeObjectForKey:key];
+        }
+        [groups removeObjectForKey:key];
     }
        
     // see if we need to use the crossref workaround (BibTeX bug)
@@ -3740,19 +3749,6 @@
     if([BDSKLocalUrlString isEqualToString:key])
         [self setLocalUrlNeedsToBeFiled:NO];
     
-       // invalidate the cached groups; they are rebuilt when needed
-       if(allFieldsChanged){
-               [groups removeAllObjects];
-       }else if(key != nil){
-               [groups removeObjectForKey:key];
-       }
-       
-    if(allFieldsChanged){
-        [URLs removeAllObjects];
-    }else if([key isURLField]){
-        [URLs removeObjectForKey:key];
-    }
-    
     NSDate *theDate = nil;
     
     // pubDate is a derived field based on Month and Year fields; we take the 
15th day of the month to avoid edge cases

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