Revision: 15271
http://sourceforge.net/p/skim-app/code/15271
Author: hofman
Date: 2025-05-24 14:56:12 +0000 (Sat, 24 May 2025)
Log Message:
-----------
use local variable, save tab info before animation
Modified Paths:
--------------
trunk/SKMainWindowController_FullScreen.m
Modified: trunk/SKMainWindowController_FullScreen.m
===================================================================
--- trunk/SKMainWindowController_FullScreen.m 2025-05-24 14:50:37 UTC (rev
15270)
+++ trunk/SKMainWindowController_FullScreen.m 2025-05-24 14:56:12 UTC (rev
15271)
@@ -380,8 +380,15 @@
if ([self presentationNotesDocument])
[self showNotesForPresentationWindow:presentationWindow];
- BOOL shouldFadeOut = NSContainsRect([presentationWindow frame], [[self
window] frame]) == NO && [[[self window] tabbedWindows] count] <= 1;
+ BOOL isInTab = [[[self window] tabbedWindows] count] > 1;
+ BOOL shouldFadeOut = NSContainsRect([presentationWindow frame], [[self
window] frame]) == NO && isInTab == NO;
+ if (isInTab) {
+ NSUInteger tabIndex = [[[self window] tabbedWindows]
indexOfObject:[self window]];
+ [savedNormalSetup setObject:[[self window] tabGroup]
forKey:TABGROUP_KEY];
+ [savedNormalSetup setObject:[NSNumber
numberWithUnsignedInteger:tabIndex] forKey:TABINDEX_KEY];
+ }
+
[NSAnimationContext runAnimationGroup:^(NSAnimationContext *context) {
[context setDuration:PRESENTATION_DURATION];
[context setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
@@ -390,12 +397,8 @@
[[mainWindow animator] setAlphaValue:0.0];
}
completionHandler:^{
- if ([[[self window] tabbedWindows] count] > 1) {
- NSUInteger tabIndex = [[[self window] tabbedWindows]
indexOfObject:[self window]];
- [savedNormalSetup setObject:[[self window] tabGroup]
forKey:TABGROUP_KEY];
- [savedNormalSetup setObject:[NSNumber
numberWithUnsignedInteger:tabIndex] forKey:TABINDEX_KEY];
+ if (isInTab)
[[self window] moveTabToNewWindow:nil];
- }
[mainWindow setDelegate:nil];
[self setWindow:presentationWindow];
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