Revision: 27624
http://sourceforge.net/p/bibdesk/svn/27624
Author: hofman
Date: 2022-06-13 14:48:25 +0000 (Mon, 13 Jun 2022)
Log Message:
-----------
notify changes to linked files for search index changes earlier, as the pub
variable may become invalid
Modified Paths:
--------------
trunk/bibdesk/BibDocument_UI.m
Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m 2022-06-13 09:01:36 UTC (rev 27623)
+++ trunk/bibdesk/BibDocument_UI.m 2022-06-13 14:48:25 UTC (rev 27624)
@@ -1446,6 +1446,13 @@
if (searchKeyDependsOnKey(BDSKAllFieldsString, changedKey))
[publications reindexPublication:pub];
+ if ([changedKey isEqualToString:BDSKLocalFileString]) {
+ NSDictionary *notifInfo = [NSDictionary
dictionaryWithObjectsAndKeys:[NSArray arrayWithObject:pub],
BDSKDocumentPublicationsKey, nil];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKDocumentDidChangeLinkedFilesNotification
+ object:self
+ userInfo:notifInfo];
+ }
+
// access type manager outside the enumerator, since it's @synchronized...
BDSKTypeManager *typeManager = [BDSKTypeManager sharedManager];
NSCharacterSet *invalidSet = [typeManager
invalidCharactersForField:BDSKCiteKeyString];
@@ -1485,13 +1492,6 @@
if ([changedKey isEqualToString:BDSKLocalFileString] || [changedKey
isEqualToString:BDSKRemoteURLString])
docFlags.itemChangeMask |= BDSKItemChangedFilesMask;
- if ([changedKey isEqualToString:BDSKLocalFileString]) {
- NSDictionary *notifInfo = [NSDictionary
dictionaryWithObjectsAndKeys:[NSArray arrayWithObject:pub],
BDSKDocumentPublicationsKey, nil];
- [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKDocumentDidChangeLinkedFilesNotification
- object:self
- userInfo:notifInfo];
- }
-
// queue for UI updating, in case the item is changed as part of a batch
process such as Find & Replace or AutoFile
if (docFlags.isDocumentClosed == NO) {
[self performSelectorOnce:@selector(handlePrivateBibItemChanged)
withObject:nil afterDelay:0.0];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit