Revision: 22608
http://sourceforge.net/p/bibdesk/svn/22608
Author: hofman
Date: 2018-09-15 11:38:04 +0000 (Sat, 15 Sep 2018)
Log Message:
-----------
Set publication of author to nil when discarding. Don't reuse category groups
with invalidated authors.
Modified Paths:
--------------
trunk/bibdesk/BibAuthor.h
trunk/bibdesk/BibAuthor.m
trunk/bibdesk/BibDocument_Groups.m
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibAuthor.h
===================================================================
--- trunk/bibdesk/BibAuthor.h 2018-09-15 09:54:08 UTC (rev 22607)
+++ trunk/bibdesk/BibAuthor.h 2018-09-15 11:38:04 UTC (rev 22608)
@@ -126,6 +126,7 @@
- (NSString *)MODSStringWithRole:(NSString *)rel;
- (BibItem *)publication;
+- (void)setPublication:(BibItem *)pub;
- (NSString *)field;
Modified: trunk/bibdesk/BibAuthor.m
===================================================================
--- trunk/bibdesk/BibAuthor.m 2018-09-15 09:54:08 UTC (rev 22607)
+++ trunk/bibdesk/BibAuthor.m 2018-09-15 11:38:04 UTC (rev 22608)
@@ -370,6 +370,10 @@
return publication;
}
+- (void)setPublication:(BibItem *)pub {
+ publication = pub;
+}
+
- (NSString *)field{
return field;
}
Modified: trunk/bibdesk/BibDocument_Groups.m
===================================================================
--- trunk/bibdesk/BibDocument_Groups.m 2018-09-15 09:54:08 UTC (rev 22607)
+++ trunk/bibdesk/BibDocument_Groups.m 2018-09-15 11:38:04 UTC (rev 22608)
@@ -486,7 +486,7 @@
NSUInteger idx = [oldGroupNames indexOfObject:groupName];
if (idx != NSNotFound) {
group = [[oldGroups objectAtIndex:idx] retain];
- if (isPersonField && [(BibAuthor *)[group name] field] == nil)
+ if (isPersonField && [(BibAuthor *)[group name] publication]
== nil)
BDSKDESTROY(group);
}
if (group == nil)
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2018-09-15 09:54:08 UTC (rev 22607)
+++ trunk/bibdesk/BibItem.m 2018-09-15 11:38:04 UTC (rev 22608)
@@ -388,6 +388,7 @@
}
- (void)dealloc{
+ [[people allValues] setValue:nil forKey:@"publication"];
BDSKDESTROY(pubFields);
BDSKDESTROY(people);
BDSKDESTROY(URLs);
@@ -585,6 +586,7 @@
- (void)resetGroupsAndPeople{
[groups removeAllObjects];
// these fields may change type, so our cached values should be discarded
+ [[people allValues] setValue:nil forKey:@"publication"];
[people release];
people = nil;
}
@@ -3715,6 +3717,7 @@
// invalidate people (authors, editors, etc.) if necessary
if (allFieldsChanged || [key isPersonField]) {
+ [[people allValues] setValue:nil forKey:@"publication"];
[people release];
people = 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