Revision: 27438
http://sourceforge.net/p/bibdesk/svn/27438
Author: hofman
Date: 2022-05-19 14:50:22 +0000 (Thu, 19 May 2022)
Log Message:
-----------
don't use separate method to abort editing
Modified Paths:
--------------
trunk/bibdesk/BDSKComplexStringEditor.m
trunk/bibdesk/BDSKEditor.m
Modified: trunk/bibdesk/BDSKComplexStringEditor.m
===================================================================
--- trunk/bibdesk/BDSKComplexStringEditor.m 2022-05-19 14:33:02 UTC (rev
27437)
+++ trunk/bibdesk/BDSKComplexStringEditor.m 2022-05-19 14:50:22 UTC (rev
27438)
@@ -89,7 +89,7 @@
[self window];
// update the value
- [self displayValue:value isError:NO];
+ [self editorTextDidChange:nil];
// reset the frame and show the window
[self editorFrameDidChange:nil];
Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m 2022-05-19 14:33:02 UTC (rev 27437)
+++ trunk/bibdesk/BDSKEditor.m 2022-05-19 14:50:22 UTC (rev 27438)
@@ -363,14 +363,6 @@
return rv;
}
-- (void)abortEditingControl:(NSControl *)control atRow:(NSInteger)row {
- [control abortEditing];
- if (row != -1)
- // controlTextDidEndEditing: is not called when calling abortEditing
- [tableCellFormatter setEditAsComplexString:NO];
- [self setEditing:NO];
-}
-
- (void)discardEditing
{
id firstResponder = [[self window] firstResponder];
@@ -393,7 +385,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)]) {
- [self abortEditingControl:control atRow:[tableView
rowForView:control]];
+ [control abortEditing];
+ if ([tableView rowForView:control] != -1)
+ // controlTextDidEndEditing: is not called when calling
abortEditing
+ [tableCellFormatter setEditAsComplexString:NO];
+ [self setEditing:NO];
}
else {
fprintf(stderr, "%s, control does not respond to
abortEditing\n", __func__);
@@ -2263,7 +2259,11 @@
- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView
doCommandBySelector:(SEL)commandSelector {
NSInteger row = [tableView rowForView:control];
if (commandSelector == @selector(cancelOperation:)) {
- [self abortEditingControl:control atRow:row];
+ [control abortEditing];
+ if (row != -1)
+ // controlTextDidEndEditing: is not called when calling
abortEditing
+ [tableCellFormatter setEditAsComplexString:NO];
+ [self setEditing:NO];
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