From: <ama...@us...> - 2006-03-18 20:05:35
|
Revision: 5868 Author: amaxwell Date: 2006-03-18 12:05:28 -0800 (Sat, 18 Mar 2006) ViewCVS: http://svn.sourceforge.net/bibdesk/?rev=5868&view=rev Log Message: ----------- fix exception (change assignment to test) Modified Paths: -------------- trunk/bibdesk/BibDocument_Search.m Modified: trunk/bibdesk/BibDocument_Search.m =================================================================== --- trunk/bibdesk/BibDocument_Search.m 2006-03-18 18:37:17 UTC (rev 5867) +++ trunk/bibdesk/BibDocument_Search.m 2006-03-18 20:05:28 UTC (rev 5868) @@ -241,19 +241,18 @@ NSString *newSearchKey = [addFieldController runSheetModalForWindow:documentWindow]; [addFieldController release]; - if(newSearchKey = nil) - return; - - newSearchKey = [newSearchKey capitalizedString]; - searchKeys = [NSMutableArray arrayWithCapacity:10]; - [searchKeys addObjectsFromArray:[[OFPreferenceWrapper sharedPreferenceWrapper] arrayForKey:BDSKQuickSearchKeys]]; - [searchKeys addObject:newSearchKey]; - [[OFPreferenceWrapper sharedPreferenceWrapper] setObject:searchKeys - forKey:BDSKQuickSearchKeys]; - - // this will sort the menu items for us - [[searchField cell] setSearchMenuTemplate:[self searchFieldMenu]]; - [self setSelectedSearchFieldKey:newSearchKey]; + if(nil != newSearchKey){ + newSearchKey = [newSearchKey capitalizedString]; + searchKeys = [NSMutableArray arrayWithCapacity:10]; + [searchKeys addObjectsFromArray:[[OFPreferenceWrapper sharedPreferenceWrapper] arrayForKey:BDSKQuickSearchKeys]]; + [searchKeys addObject:newSearchKey]; + [[OFPreferenceWrapper sharedPreferenceWrapper] setObject:searchKeys + forKey:BDSKQuickSearchKeys]; + + // this will sort the menu items for us + [[searchField cell] setSearchMenuTemplate:[self searchFieldMenu]]; + [self setSelectedSearchFieldKey:newSearchKey]; + } } - (IBAction)quickSearchRemoveField:(id)sender{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |