Revision: 11886
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11886&view=rev
Author:   hofman
Date:     2007-12-12 13:34:48 -0800 (Wed, 12 Dec 2007)

Log Message:
-----------
Prevent early return. Don't setup fields when the parent is removed.

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

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2007-12-12 20:38:10 UTC (rev 11885)
+++ trunk/bibdesk/BDSKEditor.m  2007-12-12 21:34:48 UTC (rev 11886)
@@ -1983,18 +1983,20 @@
 }
        
 - (void)bibWasAddedOrRemoved:(NSNotification *)notification{
-       NSEnumerator *pubEnum = [[[notification userInfo] objectForKey:@"pubs"] 
objectEnumerator];
-       id pub;
        NSString *crossref = [publication valueOfField:BDSKCrossrefString 
inherit:NO];
        
-       if ([NSString isEmptyString:crossref])
-               return;
-       while (pub = [pubEnum nextObject]) {
-               if ([crossref caseInsensitiveCompare:[pub 
valueForKey:@"citeKey"]] != NSOrderedSame) 
-                       continue;
-               [self setupFields];
-               return;
-       }
+       if ([NSString isEmptyString:crossref] == NO) {
+        NSEnumerator *pubEnum = [[[notification userInfo] 
objectForKey:@"pubs"] objectEnumerator];
+        id pub;
+        
+        while (pub = [pubEnum nextObject]) {
+            if ([crossref caseInsensitiveCompare:[pub valueForKey:@"citeKey"]] 
== NSOrderedSame) {
+                // changes in the parent cannot change the field names, as 
custom fields are never inherited
+                [tableView reloadData];
+                break;
+            }
+        }
+    }
 }
  
 - (void)typeInfoDidChange:(NSNotification *)aNotification{


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to