Revision: 29905
          http://sourceforge.net/p/bibdesk/svn/29905
Author:   hofman
Date:     2025-11-30 15:13:45 +0000 (Sun, 30 Nov 2025)
Log Message:
-----------
get BibAuthor for category group from dictionary for person field

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

Modified: trunk/bibdesk/BDSKCategoryGroup.m
===================================================================
--- trunk/bibdesk/BDSKCategoryGroup.m   2025-11-30 15:05:35 UTC (rev 29904)
+++ trunk/bibdesk/BDSKCategoryGroup.m   2025-11-30 15:13:45 UTC (rev 29905)
@@ -70,15 +70,20 @@
 }
 
 - (instancetype)initWithDictionary:(NSDictionary *)groupDict {
-    NSString *aName = [[groupDict objectForKey:@"group name"] 
stringByUnescapingGroupPlistEntities];
+    id aName = [[groupDict objectForKey:@"group name"] 
stringByUnescapingGroupPlistEntities];
     NSString *aKey = [[groupDict objectForKey:@"key"] 
stringByUnescapingGroupPlistEntities];
+    if ([aKey isPersonField])
+        aName = [BibAuthor authorWithName:aName];
     self = [self initWithName:aName key:aKey];
     return self;
 }
 
 - (NSDictionary *)dictionaryValue {
-    NSString *aName = [[[self name] description] 
stringByEscapingGroupPlistEntities];
+    id aName = [self name];
     NSString *aKey = [[self key] stringByEscapingGroupPlistEntities];
+    if ([aName isKindOfClass:[BibAuthor class]])
+        aName = [aName originalName];
+    aName = [aName stringByEscapingGroupPlistEntities];
     return [NSDictionary dictionaryWithObjectsAndKeys:aName, @"group name", 
aKey, @"key", nil];
 }
 

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