Revision: 14984
          http://sourceforge.net/p/skim-app/code/14984
Author:   hofman
Date:     2025-03-17 22:48:55 +0000 (Mon, 17 Mar 2025)
Log Message:
-----------
Check for tab bar controller before removing it

Modified Paths:
--------------
    trunk/SKMainWindow.m

Modified: trunk/SKMainWindow.m
===================================================================
--- trunk/SKMainWindow.m        2025-03-17 22:33:21 UTC (rev 14983)
+++ trunk/SKMainWindow.m        2025-03-17 22:48:55 UTC (rev 14984)
@@ -186,8 +186,8 @@
 }
 
 - (void)removeTitlebarAccessoryViewControllerAtIndex:(NSInteger)index {
-    [super removeTitlebarAccessoryViewControllerAtIndex:index];
     if ([self autoTitleVisibility] == SKWindowTitleHiddenForTabBar && [self 
safeTabBarAccessoryController] == [[self titlebarAccessoryViewControllers] 
objectAtIndex:index]) {
+        [super removeTitlebarAccessoryViewControllerAtIndex:index];
         [self setTitleVisibility:NSWindowTitleVisible];
         if ([[self toolbar] isVisible] == NO) {
             NSURL *url = [self representedURL];
@@ -194,6 +194,8 @@
             [self setRepresentedURL:nil];
             [self setRepresentedURL:url];
         }
+    } else {
+        [super removeTitlebarAccessoryViewControllerAtIndex:index];
     }
 }
 

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to