Revision: 22605
http://sourceforge.net/p/bibdesk/svn/22605
Author: hofman
Date: 2018-09-15 09:19:46 +0000 (Sat, 15 Sep 2018)
Log Message:
-----------
pub type is not a field
Modified Paths:
--------------
trunk/bibdesk/BibDocument_Groups.m
Modified: trunk/bibdesk/BibDocument_Groups.m
===================================================================
--- trunk/bibdesk/BibDocument_Groups.m 2018-09-15 06:30:35 UTC (rev 22604)
+++ trunk/bibdesk/BibDocument_Groups.m 2018-09-15 09:19:46 UTC (rev 22605)
@@ -1386,29 +1386,28 @@
for (BibItem *pub in pubs){
BDSKASSERT([pub isKindOfClass:[BibItem class]]);
- oldValue = [[[pub valueOfField:field] retain] autorelease];
+ if(field && [field isEqualToString:BDSKPubTypeString] == NO)
+ oldValue = [[[pub valueOfField:field] retain] autorelease];
rv = [pub replaceGroup:group withGroup:newGroup
handleInherited:handleInherited];
- if(rv == BDSKFieldActionSet || rv == BDSKFieldActionAppend){
- count++;
- [changedPubs addObject:pub];
- [oldValues addObject:oldValue ?: @""];
- [newValues addObject:[pub valueOfField:field]];
- }else if(rv == BDSKFieldActionAsk){
+ if(rv == BDSKFieldActionAsk){
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert setMessageText:NSLocalizedString(@"Inherited Value",
@"Message in alert dialog when trying to edit inherited value")];
[alert setInformativeText:NSLocalizedString(@"One or more items
have a value that was inherited from an item linked to by the Crossref field.
This operation would break the inheritance for this value. What do you want me
to do with inherited values?", @"Informative text in alert dialog")];
[[alert addButtonWithTitle:NSLocalizedString(@"Don't Change",
@"Button title")] setTag:BDSKFieldActionIgnore];
[[alert addButtonWithTitle:NSLocalizedString(@"Remove", @"Button
title")] setTag:BDSKFieldActionAppend];
- rv = [alert runModal];
- handleInherited = rv;
- if(handleInherited != BDSKFieldActionIgnore){
- [pub replaceGroup:group withGroup:newGroup
handleInherited:handleInherited];
- count++;
+ handleInherited = rv = [alert runModal];
+ if(rv != BDSKFieldActionIgnore)
+ [pub replaceGroup:group withGroup:newGroup
handleInherited:handleInherited];
+ }
+
+ if(rv == BDSKFieldActionSet || rv == BDSKFieldActionAppend){
+ count++;
+ if(field && [field isEqualToString:BDSKPubTypeString] == NO) {
[changedPubs addObject:pub];
[oldValues addObject:oldValue ?: @""];
[newValues addObject:[pub valueOfField:field]];
- }
+ }
}
}
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