Revision: 30040
          http://sourceforge.net/p/bibdesk/svn/30040
Author:   hofman
Date:     2026-02-22 16:51:33 +0000 (Sun, 22 Feb 2026)
Log Message:
-----------
no need to update textView or button when inherited values change

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

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2026-02-22 15:36:21 UTC (rev 30039)
+++ trunk/bibdesk/BDSKEditor.m  2026-02-22 16:51:33 UTC (rev 30040)
@@ -2297,11 +2297,11 @@
     NSString *oldValue = [userInfo objectForKey:BDSKBibItemOldValueKey];
        BibItem *sender = (BibItem *)[notification object];
        BOOL parentChanged = NO;
-       
+    BOOL inheritedValueChanged = NO;
+    
     // If it is not our item or his crossref parent, we don't care, but our 
parent may have changed his cite key or an inherited value
        if (sender != publication) {
         NSString *crossref = [publication valueOfField:BDSKCrossrefString 
inherit:NO];
-        BOOL inheritedValueChanged = NO;
         if([NSString isEmptyString:crossref] == NO){
             if([changeKey isEqualToString:BDSKCiteKeyString])
                 parentChanged = ([crossref isCaseInsensitiveEqual:newValue] || 
[crossref isCaseInsensitiveEqual:oldValue]);
@@ -2354,7 +2354,7 @@
         [self updateCiteKeyDuplicateWarning];
     }
     else if([changeKey isNoteField]){
-        if(editorFlags.ignoreFieldChange == NO && (newValue || oldValue)) {
+        if(editorFlags.ignoreFieldChange == NO && (newValue || oldValue) && 
inheritedValueChanged == NO) {
             if (currentEditedView && [[currentEditedView identifier] 
isEqualToString:changeKey]) {
                 [currentEditedView setString:newValue ?: @""];
                 // undo actions in the text view are now invalid
@@ -2369,9 +2369,11 @@
         }
     }
        else if([changeKey isIntegerField]){
-        NSUInteger idx = [[collectionView content] indexOfObject:changeKey];
-        if (idx != NSNotFound)
-            [[(BDSKEditorCollectionViewItem *)[collectionView itemAtIndex:idx] 
button] setIntegerValue:[publication integerValueOfField:changeKey]];
+        if (inheritedValueChanged == NO){
+            NSUInteger idx = [[collectionView content] 
indexOfObject:changeKey];
+            if (idx != NSNotFound)
+                [[(BDSKEditorCollectionViewItem *)[collectionView 
itemAtIndex:idx] button] setIntegerValue:[publication 
integerValueOfField:changeKey]];
+        }
        }
     else if (changeKey == nil){
         // all fields are set
@@ -2383,10 +2385,11 @@
             [[textField currentEditor] setString:[textField formatter] ? 
[[textField formatter] editingStringForObjectValue:tmpValue] : tmpValue];
         }
         [self reloadTableWithFields:[self currentFields]];
-        [self setupCollectionView];
+        if (inheritedValueChanged == NO)
+            [self setupCollectionView];
         [self synchronizeWindowTitleWithDocumentName];
         [authorTableView reloadData];
-        if (editorFlags.ignoreFieldChange == NO) {
+        if (editorFlags.ignoreFieldChange == NO && inheritedValueChanged == 
NO) {
             if (currentEditedView) {
                 NSString *editedKey = [currentEditedView identifier];
                 // make sure we are getting the actual current value rather 
than the edited 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