Revision: 30024
          http://sourceforge.net/p/bibdesk/svn/30024
Author:   hofman
Date:     2026-02-20 15:37:50 +0000 (Fri, 20 Feb 2026)
Log Message:
-----------
make sure field editor is removed before closing the window

Modified Paths:
--------------
    trunk/bibdesk/BDSKEditor.m

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2026-02-20 15:28:37 UTC (rev 30023)
+++ trunk/bibdesk/BDSKEditor.m  2026-02-20 15:37:50 UTC (rev 30024)
@@ -2894,6 +2894,10 @@
         if (didEndEditing == NO)
             [self discardEditing];
     }
+    if ([[[self window] firstResponder] isKindOfClass:[NSText class]] && 
[(NSText *)[[self window] firstResponder] isFieldEditor]) {
+        [[self window] endEditingFor:nil];
+        [self setEditing:NO];
+    }
 }
 
 - (void)windowWillClose:(NSNotification *)notification{
@@ -2902,8 +2906,6 @@
     
     editorFlags.isEditable = NO;
     
-    [[self window] endEditingFor:nil];
-    
     @try {
         [fileView removeObserver:self forKeyPath:@"iconScale" 
context:&BDSKEditorObservationContext];
         [fileView removeObserver:self forKeyPath:@"displayMode" 
context:&BDSKEditorObservationContext];

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

Reply via email to