Revision: 30088
          http://sourceforge.net/p/bibdesk/svn/30088
Author:   hofman
Date:     2026-03-01 15:35:39 +0000 (Sun, 01 Mar 2026)
Log Message:
-----------
can pass nil old or new value

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

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2026-03-01 09:27:02 UTC (rev 30087)
+++ trunk/bibdesk/BDSKEditor.m  2026-03-01 15:35:39 UTC (rev 30088)
@@ -928,7 +928,7 @@
             } else {
                 [publication setField:oldField toValue:nil];
                 [[self undoManager] setActionName:NSLocalizedString(@"Remove 
Field", @"Undo action name")];
-                [self userChangedField:oldField from:oldValue to:@""];
+                [self userChangedField:oldField from:oldValue to:nil];
             }
         }];
     }
@@ -989,8 +989,8 @@
         [publication setField:newField toValue:oldValue];
         [[self undoManager] setActionName:NSLocalizedString(@"Change Field 
Name", @"Undo action name")];
         [self setKeyField:newField];
-        autoGenerateStatus = [[self document] userChangedField:oldField 
ofPublication:publication from:oldValue to:@""];
-        autoGenerateStatus |= [[self document] userChangedField:newField 
ofPublication:publication from:@"" to:oldValue];
+        autoGenerateStatus = [[self document] userChangedField:oldField 
ofPublication:publication from:oldValue to:nil];
+        autoGenerateStatus |= [[self document] userChangedField:newField 
ofPublication:publication from:nil to:oldValue];
         [self updateStatusForAutoGenerate:autoGenerateStatus];
        }];
 }
@@ -2255,7 +2255,7 @@
     [publication setEditedValue:nil];
     
     NSString *field = [currentEditedView identifier];
-    NSString *oldValue = [publication valueOfField:field inherit:NO] ?: @"";
+    NSString *oldValue = [publication valueOfField:field inherit:NO];
     NSString *value = [currentEditedView string];
     
     editorFlags.ignoreFieldChange = YES;
@@ -3538,7 +3538,7 @@
 }
 
 - (void)userChangedField:(NSString *)fieldName from:(NSString *)oldValue 
to:(NSString *)newValue {
-    BDSKAutoGenerateStatus mask = [[self document] userChangedField:fieldName 
ofPublication:publication from:oldValue ?: @"" to:newValue];
+    BDSKAutoGenerateStatus mask = [[self document] userChangedField:fieldName 
ofPublication:publication from:oldValue to:newValue];
     [self updateStatusForAutoGenerate:mask];
 }
 

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