Revision: 27527
http://sourceforge.net/p/bibdesk/svn/27527
Author: hofman
Date: 2022-06-02 16:29:44 +0000 (Thu, 02 Jun 2022)
Log Message:
-----------
invert a condition, and check preferences only when relevant
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2022-06-02 16:18:20 UTC (rev 27526)
+++ trunk/bibdesk/BibItem.m 2022-06-02 16:29:44 UTC (rev 27527)
@@ -303,13 +303,12 @@
if ([urlsArray count]) {
NSUserDefaults *sud = [NSUserDefaults standardUserDefaults];
BOOL addLinkedFiles = NO == [sud boolForKey:BDSKUseLocalUrlAndUrlKey];
- BOOL addUrlField = addLinkedFiles == NO || [sud
boolForKey:BDSKAutomaticallyConvertURLFieldsKey] == NO || [sud
boolForKey:BDSKRemoveConvertedRemoteURLFieldsKey] == NO;
if (addLinkedFiles)
filesArray = [NSMutableArray array];
for (NSString *url in urlsArray) {
if (addLinkedFiles)
[filesArray addObject:[BDSKLinkedFile
linkedFileWithURLString:url]];
- if ([fieldsDict objectForKey:BDSKUrlString] && addUrlField)
+ if ([fieldsDict objectForKey:BDSKUrlString] == nil &&
(addLinkedFiles == NO || [sud boolForKey:BDSKAutomaticallyConvertURLFieldsKey]
== NO || [sud boolForKey:BDSKRemoveConvertedRemoteURLFieldsKey] == NO))
[(NSMutableDictionary *)fieldsDict setObject:url
forKey:BDSKUrlString];
}
}
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