Revision: 27479 http://sourceforge.net/p/bibdesk/svn/27479 Author: hofman Date: 2022-05-26 09:29:57 +0000 (Thu, 26 May 2022) Log Message: ----------- Only make sure text fields redisplay when macro definitions change, no need to reload the table. Make sure complex string editor text field redisplays, the expaqnded value may change even as the string does not.
Modified Paths: -------------- trunk/bibdesk/BDSKComplexStringEditor.m trunk/bibdesk/BDSKEditor.m Modified: trunk/bibdesk/BDSKComplexStringEditor.m =================================================================== --- trunk/bibdesk/BDSKComplexStringEditor.m 2022-05-26 09:05:09 UTC (rev 27478) +++ trunk/bibdesk/BDSKComplexStringEditor.m 2022-05-26 09:29:57 UTC (rev 27479) @@ -196,6 +196,7 @@ [expandedValueTextField setTextColor:[NSColor controlTextColor]]; [expandedValueTextField setToolTip:NSLocalizedString(@"This field contains macros and is being edited as it would appear in a BibTeX file. This is the expanded value.", @"Tool tip message")]; } + [expandedValueTextField setNeedsDisplay:YES]; } - (void)updateFocusRing { Modified: trunk/bibdesk/BDSKEditor.m =================================================================== --- trunk/bibdesk/BDSKEditor.m 2022-05-26 09:05:09 UTC (rev 27478) +++ trunk/bibdesk/BDSKEditor.m 2022-05-26 09:29:57 UTC (rev 27479) @@ -2588,12 +2588,16 @@ - (void)macrosDidChange:(NSNotification *)notification{ id changedOwner = [[notification object] owner]; if(changedOwner == nil || changedOwner == [publication owner]) { - for (NSString *field in fields) { - if ([[publication valueOfField:field] isComplex] && [self commitEditing]) { - [self reloadTableWithFields:nil]; - break; + [fields enumerateObjectsUsingBlock:^(NSString *field, NSUInteger row, BOOL *stop){ + NSString *value = [publication valueOfField:field]; + if ([value isComplex]) { + BDSKEditorTextField *textField = [self textFieldAtRow:row]; + if ([textField currentEditor] == nil) + [textField setNeedsDisplay:YES]; + else if ([tableCellFormatter editAsComplexString]) + [tableCellFormatter didStartEditor:[textField currentEditor]]; } - } + }]; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit