Revision: 27430
http://sourceforge.net/p/bibdesk/svn/27430
Author: hofman
Date: 2022-05-18 15:09:57 +0000 (Wed, 18 May 2022)
Log Message:
-----------
restore value in text field when calling abortEditing, it may be inherited, and
the value is reset to a newly generated value when editing started
Modified Paths:
--------------
trunk/bibdesk/BDSKEditor.m
Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m 2022-05-18 06:30:15 UTC (rev 27429)
+++ trunk/bibdesk/BDSKEditor.m 2022-05-18 15:09:57 UTC (rev 27430)
@@ -386,9 +386,11 @@
// may be self, if a textview was being edited (but we should have
taken the first branch in that case)
if ([control respondsToSelector:@selector(abortEditing)]) {
[control abortEditing];
- if ([tableView rowForView:control] != -1) {
+ NSInteger row = [tableView rowForView:control];
+ if (row != -1) {
// controlTextDidEndEditing: is not called when calling
abortEditing
[tableCellFormatter setEditAsComplexString:NO];
+ [control setObjectValue:[publication valueOfField:[fields
objectAtIndex:row]] ?: @""];
}
}
else {
@@ -2261,8 +2263,10 @@
if (commandSelector == @selector(cancelOperation:)) {
[control abortEditing];
[self setEditing:NO];
- if (row != -1)
+ if (row != -1) {
[tableCellFormatter setEditAsComplexString:NO];
+ [control setObjectValue:[publication valueOfField:[fields
objectAtIndex:row]] ?: @""];
+ }
return YES;
} else if (row == -1) {
return 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