Revision: 27533
http://sourceforge.net/p/bibdesk/svn/27533
Author: hofman
Date: 2022-06-03 14:52:11 +0000 (Fri, 03 Jun 2022)
Log Message:
-----------
don't notify bib changes when there is no owner
Modified Paths:
--------------
trunk/bibdesk/BibItem.m
Modified: trunk/bibdesk/BibItem.m
===================================================================
--- trunk/bibdesk/BibItem.m 2022-06-03 14:14:07 UTC (rev 27532)
+++ trunk/bibdesk/BibItem.m 2022-06-03 14:52:11 UTC (rev 27533)
@@ -1198,14 +1198,16 @@
[pubFields setValue:[date standardDescription]
forKey:BDSKDateModifiedString];
[self updateMetadataForKey:key];
- NSMutableDictionary *notifInfo = [NSMutableDictionary
dictionaryWithObjectsAndKeys:key, BDSKBibItemKeyKey, nil];
- [notifInfo setValue:value forKey:BDSKBibItemNewValueKey];
- [notifInfo setValue:oldValue forKey:BDSKBibItemOldValueKey];
- [oldValue release];
-
- [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibItemChangedNotification
-
object:self
-
userInfo:notifInfo];
+ if ([self owner]) {
+ NSMutableDictionary *notifInfo = [NSMutableDictionary
dictionaryWithObjectsAndKeys:key, BDSKBibItemKeyKey, nil];
+ [notifInfo setValue:value forKey:BDSKBibItemNewValueKey];
+ [notifInfo setValue:oldValue forKey:BDSKBibItemOldValueKey];
+ [oldValue release];
+
+ [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibItemChangedNotification
+ object:self
+ userInfo:notifInfo];
+ }
}
- (void)replaceValueOfFieldByCopy:(NSString *)key{
@@ -2808,10 +2810,12 @@
// this updates the search index
[self updateMetadataForKey:key];
// make sure the UI is notified that the linked file has changed, as this
is often called after setField:toValue:
- NSDictionary *notifInfo = [NSDictionary dictionaryWithObjectsAndKeys:key,
BDSKBibItemKeyKey, nil];
- [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibItemChangedNotification
- object:self
- userInfo:notifInfo];
+ if ([self owner]) {
+ NSDictionary *notifInfo = [NSDictionary
dictionaryWithObjectsAndKeys:key, BDSKBibItemKeyKey, nil];
+ [[NSNotificationCenter defaultCenter]
postNotificationName:BDSKBibItemChangedNotification
+ object:self
+ userInfo:notifInfo];
+ }
}
- (NSURL *)URLForField:(NSString *)field{
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