Revision: 27408
          http://sourceforge.net/p/bibdesk/svn/27408
Author:   hofman
Date:     2022-05-13 15:12:02 +0000 (Fri, 13 May 2022)
Log Message:
-----------
Flag tomake sure we don't reselect after windowDidClose was called for editor

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

Modified: trunk/bibdesk/BDSKEditor.h
===================================================================
--- trunk/bibdesk/BDSKEditor.h  2022-05-13 14:39:24 UTC (rev 27407)
+++ trunk/bibdesk/BDSKEditor.h  2022-05-13 15:12:02 UTC (rev 27408)
@@ -125,6 +125,7 @@
         unsigned int isEditing:1;
         unsigned int isAnimating:1;
         unsigned int didSetupFields:1;
+        unsigned int didClose:1;
         unsigned int controllingQLPreviewPanel:1;
         unsigned int controllingFVPreviewPanel:1;
     } editorFlags;

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2022-05-13 14:39:24 UTC (rev 27407)
+++ trunk/bibdesk/BDSKEditor.m  2022-05-13 15:12:02 UTC (rev 27408)
@@ -446,7 +446,7 @@
         
         // for inherited fields, we should do something here to make sure the 
user doesn't have to go through the warning sheet
                
-               if ([[self window] makeFirstResponder:firstResponder] && 
editorFlags.didSetupFields == NO) {
+               if (editorFlags.didClose == NO && editorFlags.didSetupFields == 
NO && [[self window] makeFirstResponder:firstResponder]) {
             if (editedRow != -1 && editedRow < [tableView numberOfRows])
                 [tableView editColumn:1 row:editedRow withEvent:nil select:NO];
             [textView setSafeSelectedRanges:selection];
@@ -2984,6 +2984,8 @@
 }
 
 - (void)windowWillClose:(NSNotification *)notification{
+    editorFlags.didClose = YES;
+    
     // make sure we're not registered as editor because we will be invalid, 
this shouldn't be necessary but there have been reports of crashes
     if (editorFlags.isEditing && [self commitEditing] == NO)
         [self discardEditing];

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