Revision: 16152
          http://sourceforge.net/p/skim-app/code/16152
Author:   hofman
Date:     2026-04-02 16:18:25 +0000 (Thu, 02 Apr 2026)
Log Message:
-----------
don't reset when find bar was not removed

Modified Paths:
--------------
    trunk/SKFindController.h
    trunk/SKFindController.m
    trunk/SKMainWindowController.m

Modified: trunk/SKFindController.h
===================================================================
--- trunk/SKFindController.h    2026-04-02 15:43:17 UTC (rev 16151)
+++ trunk/SKFindController.h    2026-04-02 16:18:25 UTC (rev 16152)
@@ -77,7 +77,7 @@
 
 @protocol SKFindControllerDelegate <NSObject>
 - (BOOL)findString:(NSString *)string forward:(BOOL)forward;
-- (void)removeFindController;
+- (BOOL)removeFindController;
 @end
 
 NS_ASSUME_NONNULL_END

Modified: trunk/SKFindController.m
===================================================================
--- trunk/SKFindController.m    2026-04-02 15:43:17 UTC (rev 16151)
+++ trunk/SKFindController.m    2026-04-02 16:18:25 UTC (rev 16152)
@@ -133,13 +133,14 @@
     if (window == nil)
         return;
     
+    if ([delegate removeFindController] == NO)
+        return;
+        
     [[NSNotificationCenter defaultCenter] removeObserver:self 
name:NSWindowDidBecomeKeyNotification object:window];
     [[NSNotificationCenter defaultCenter] removeObserver:self 
name:NSWindowDidResignKeyNotification object:window];
     [self windowDidResignKey:nil];
     
     [messageField setHidden:YES];
-    
-    [delegate removeFindController];
 }
 
 - (IBAction)toggleCaseInsensitiveFind:(id)sender {

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2026-04-02 15:43:17 UTC (rev 16151)
+++ trunk/SKMainWindowController.m      2026-04-02 16:18:25 UTC (rev 16152)
@@ -1865,9 +1865,9 @@
        }
 }
 
-- (void)removeFindController {
+- (BOOL)removeFindController {
     if (mwcFlags.isAnimatingFindBar)
-        return;
+        return NO;
     
     BOOL animate = [NSView shouldShowSlideAnimation];
     NSView *findBar = [findController view];
@@ -1909,6 +1909,8 @@
         [contentView layoutSubtreeIfNeeded];
         [window recalculateKeyViewLoop];
     }
+    
+    return YES;
 }
 
 - (void)showFindBar {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to