Revision: 29362
          http://sourceforge.net/p/bibdesk/svn/29362
Author:   hofman
Date:     2025-07-25 15:25:15 +0000 (Fri, 25 Jul 2025)
Log Message:
-----------
should reindex crossref children when cite key changes

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

Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m      2025-07-25 09:28:02 UTC (rev 29361)
+++ trunk/bibdesk/BibDocument_UI.m      2025-07-25 15:25:15 UTC (rev 29362)
@@ -1452,14 +1452,14 @@
     if ([changedKey isNoteField] == NO && [changedKey isGeneralURLField] == NO 
&& [changedKey isIntegerField] == NO && [changedKey isCitationField] == NO && 
[changedKey isEqualToString:BDSKPubTypeString] == NO && [changedKey 
isEqualToString:BDSKCrossrefString] == NO && [changedKey 
isEqualToString:BDSKColorString] == NO) {
         NSArray *crossrefChildren = [publications itemsForCrossref:key];
         if ([crossrefChildren count]) {
+            // all inherited fields could change when parent is created, needs 
full UI update
+            if ([changedKey isEqualToString:BDSKCiteKeyString])
+                changedKey = nil;
             // invalidate groups that depend on inherited values
             [crossrefChildren 
makeObjectsPerformSelector:@selector(resetGroups)];
-            if (shouldReindex)
+            if (shouldReindex || changedKey == nil)
                 [publications reindexPublications:crossrefChildren];
             [changedPublications addObjectsFromArray:crossrefChildren];
-            // all inherited fields could change when parent is created, needs 
full UI update
-            if ([changedKey isEqualToString:BDSKCiteKeyString])
-                changedKey = nil;
         }
         if (oldKey) {
             // change the crossrefs if we change the parent cite key

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