Revision: 28177
http://sourceforge.net/p/bibdesk/svn/28177
Author: hofman
Date: 2023-02-23 22:10:46 +0000 (Thu, 23 Feb 2023)
Log Message:
-----------
don't change citeKey in text import when value does not change
Modified Paths:
--------------
trunk/bibdesk/BDSKTextImportController.m
Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m 2023-02-23 15:21:18 UTC (rev
28176)
+++ trunk/bibdesk/BDSKTextImportController.m 2023-02-23 22:10:46 UTC (rev
28177)
@@ -1105,9 +1105,12 @@
NSControl *control = [notification object];
if ([control isEqual:citeKeyField]) {
BibItem *item = [self publication];
- [item setCiteKey:[citeKeyField stringValue]];
- [[self undoManager] setActionName:NSLocalizedString(@"Edit Cite Key",
@"Undo action name")];
- [self setCiteKeyDuplicateWarning:[item isValidCiteKey:[item citeKey]]
== NO];
+ NSString *newCiteKey = [control stringValue];
+ if ([newCiteKey isEqualToString:[item citeKey]] == NO) {
+ [item setCiteKey:newCiteKey];
+ [[self undoManager] setActionName:NSLocalizedString(@"Edit Cite
Key", @"Undo action name")];
+ [self setCiteKeyDuplicateWarning:[item isValidCiteKey:[item
citeKey]] == NO];
+ }
} else if ([itemTableView rowForView:control] != -1) {
[tableCellFormatter setEditAsComplexString:NO];
}
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