Revision: 15238
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15238&view=rev
Author:   hofman
Date:     2009-04-29 17:11:35 +0000 (Wed, 29 Apr 2009)

Log Message:
-----------
don't add new group field when already present

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

Modified: trunk/bibdesk/BibDocument_Groups.m
===================================================================
--- trunk/bibdesk/BibDocument_Groups.m  2009-04-29 15:18:37 UTC (rev 15237)
+++ trunk/bibdesk/BibDocument_Groups.m  2009-04-29 17:11:35 UTC (rev 15238)
@@ -792,7 +792,8 @@
        }
        
        NSMutableArray *array = [[[NSUserDefaults standardUserDefaults] 
stringArrayForKey:BDSKGroupFieldsKey] mutableCopy];
-       [array addObject:newGroupField];
+       if ([array indexOfObject:newGroupField] == NSNotFound)
+        [array addObject:newGroupField];
        [[NSUserDefaults standardUserDefaults] setObject:array 
forKey:BDSKGroupFieldsKey];      
     
     [self setCurrentGroupField:newGroupField];


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

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to