From: <ho...@us...> - 2006-05-09 06:05:28
|
Revision: 6485 Author: hofman Date: 2006-05-08 23:05:20 -0700 (Mon, 08 May 2006) ViewCVS: http://svn.sourceforge.net/bibdesk/?rev=6485&view=rev Log Message: ----------- Use bibtype manager to get annote abstract rss-description. Make sure we only replace uninherited values. Modified Paths: -------------- trunk/bibdesk/BibEditor.m Modified: trunk/bibdesk/BibEditor.m =================================================================== --- trunk/bibdesk/BibEditor.m 2006-05-09 05:44:49 UTC (rev 6484) +++ trunk/bibdesk/BibEditor.m 2006-05-09 06:05:20 UTC (rev 6485) @@ -3040,12 +3040,11 @@ - (void)breakTextStorageConnections { // This is a fix for bug #1483613 (and others). We set some of the BibItem's fields to -[[NSTextView textStorage] mutableString] for efficiency in tracking changes for live editing updates in the main window preview. However, this causes a retain cycle, as the text storage retains its text view; any font changes to the editor text view will cause the retained textview to message its delegate (BibEditor) which is garbage in -[NSTextView _addToTypingAttributes]. - NSSet *fields = [NSSet setWithObjects:BDSKAnnoteString, BDSKAbstractString, BDSKRssDescriptionString, nil]; - NSEnumerator *fieldE = [fields objectEnumerator]; + NSEnumerator *fieldE = [[[BibTypeManager sharedManager] noteFieldsSet] objectEnumerator]; NSString *currentValue = nil; NSString *fieldName = nil; while(fieldName = [fieldE nextObject]){ - currentValue = [[theBib valueOfField:fieldName] copy]; + currentValue = [[theBib valueOfField:fieldName inherit:NO] copy]; // set without undo, or we dirty the document every time the editor is closed if(nil != currentValue) [theBib setField:fieldName toValueWithoutUndo:currentValue]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |