Revision: 28954
http://sourceforge.net/p/bibdesk/svn/28954
Author: hofman
Date: 2024-10-15 09:22:49 +0000 (Tue, 15 Oct 2024)
Log Message:
-----------
don't reset date added and modified when crossref changes
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2024-10-15 09:10:14 UTC (rev 28953)
+++ trunk/bibdesk/BibItem.m 2024-10-15 09:22:49 UTC (rev 28954)
@@ -4131,22 +4131,18 @@
}
// initially or when all fields are changed set the added and modified
date based on the field values
- if ((key == nil && dateAdded == nil) || allFieldsChanged) {
- NSString *dateAddedValue = [pubFields
objectForKey:BDSKDateAddedString];
- if ([NSString isEmptyString:dateAddedValue]) {
- [self setDateAdded:nil];
- } else {
- NSDate *theDate = [NSDate
dateWithStandardDescription:dateAddedValue];
- [self setDateAdded:theDate];
- }
+ if ((key == nil && dateAdded == nil) || [BDSKAllFieldsString
isEqualToString:key]) {
+ NSString *dateValue = [pubFields
objectForKey:BDSKDateAddedString];
+ NSDate *theDate = nil;
+ if ([NSString isEmptyString:dateValue] == NO)
+ theDate = [NSDate dateWithStandardDescription:dateValue];
+ [self setDateAdded:theDate];
- NSString *dateModValue = [pubFields
objectForKey:BDSKDateModifiedString];
- if ([NSString isEmptyString:dateModValue]) {
- [self setDateModified:nil];
- } else {
- NSDate *theDate = [NSDate
dateWithStandardDescription:dateModValue];
- [self setDateModified:theDate];
- }
+ dateValue = [pubFields objectForKey:BDSKDateModifiedString];
+ theDate = nil;
+ if ([NSString isEmptyString:dateValue] == NO)
+ theDate = [NSDate dateWithStandardDescription:dateValue];
+ [self setDateModified:theDate];
}
}
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