Revision: 27440
          http://sourceforge.net/p/bibdesk/svn/27440
Author:   hofman
Date:     2022-05-19 21:49:45 +0000 (Thu, 19 May 2022)
Log Message:
-----------
restore inherited value when clearing it

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

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2022-05-19 14:51:48 UTC (rev 27439)
+++ trunk/bibdesk/BDSKEditor.m  2022-05-19 21:49:45 UTC (rev 27440)
@@ -1160,7 +1160,9 @@
     NSString *oldValue = [publication valueOfField:field] ?: @"";
     NSString *value = [sender objectValue] ?: @"";
     
-    if (NO == [value isEqualAsComplexString:oldValue]) {
+    if (0&&[oldValue isInherited] && [NSString isEmptyAsComplexString:value]) {
+        [sender setObjectValue:oldValue];
+    } else if (NO == [value isEqualAsComplexString:oldValue]) {
         [self recordChangingField:field toValue:value];
         // button should be update implicitly by the bibDidChange notification
     }

Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m    2022-05-19 14:51:48 UTC (rev 
27439)
+++ trunk/bibdesk/BDSKTextImportController.m    2022-05-19 21:49:45 UTC (rev 
27440)
@@ -394,7 +394,9 @@
     NSString *key = [fields objectAtIndex:row];
     NSString *value = [sender objectValue];
     NSString *oldValue = [[self publication] valueOfField:key];
-    if (NO == [value isEqualAsComplexString:oldValue])
+    if ([oldValue isInherited] && [NSString isEmptyAsComplexString:value])
+        [sender setObjectValue:oldValue];
+    else if (NO == [value isEqualAsComplexString:oldValue])
         [self recordChangingField:key toValue:value];
 }
 

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