Revision: 30003
          http://sourceforge.net/p/bibdesk/svn/30003
Author:   hofman
Date:     2026-02-16 16:16:20 +0000 (Mon, 16 Feb 2026)
Log Message:
-----------
Invert condition. Close pref window when allowing to close pref pane with delay.

Modified Paths:
--------------
    trunk/bibdesk/BDSKPreferenceController.m
    trunk/bibdesk/BibPref_AutoFile.m

Modified: trunk/bibdesk/BDSKPreferenceController.m
===================================================================
--- trunk/bibdesk/BDSKPreferenceController.m    2026-02-16 15:46:41 UTC (rev 
30002)
+++ trunk/bibdesk/BDSKPreferenceController.m    2026-02-16 16:16:20 UTC (rev 
30003)
@@ -201,7 +201,7 @@
 }
 
 - (BOOL)windowShouldClose:(id)window {
-    if ([[self window] attachedSheet])
+    if ([window attachedSheet])
         return NO;
     BDSKPreferencePane *pane = [self selectedPane];
     if (pane == nil)
@@ -208,9 +208,16 @@
         return YES;
     __block BOOL shouldClose = NO;
     [pane shouldHideWithReply:^(BOOL shouldHide){
-        shouldClose = shouldHide;
+        if (shouldHide) {
+            if (shouldClose)
+                [window performClose:nil];
+            shouldClose = YES;
+        }
     }];
-    return shouldClose;
+    if (shouldClose)
+        return YES;
+    shouldClose = YES;
+    return NO;
 }
 
 - (void)windowWillClose:(NSNotification *)notification {

Modified: trunk/bibdesk/BibPref_AutoFile.m
===================================================================
--- trunk/bibdesk/BibPref_AutoFile.m    2026-02-16 15:46:41 UTC (rev 30002)
+++ trunk/bibdesk/BibPref_AutoFile.m    2026-02-16 16:16:20 UTC (rev 30003)
@@ -270,7 +270,7 @@
     NSWindow *window = [[self view] window];
     BOOL editingFormat = [formatField currentEditor] != nil;
     
-    if ([[window firstResponder] isKindOfClass:[NSText class]] && [(NSView 
*)[window firstResponder] isDescendantOf:[self view]] && NO == [window 
makeFirstResponder:nil]) {
+    if ([[window firstResponder] isKindOfClass:[NSText class]] == NO || 
[(NSView *)[window firstResponder] isDescendantOf:[self view]] == NO || [window 
makeFirstResponder:nil]) {
         
         reply(YES);
         

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