Revision: 14310
          http://sourceforge.net/p/skim-app/code/14310
Author:   hofman
Date:     2024-06-06 16:26:21 +0000 (Thu, 06 Jun 2024)
Log Message:
-----------
define variables only when needed

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2024-06-06 16:22:13 UTC (rev 14309)
+++ trunk/SKMainWindowController.m      2024-06-06 16:26:21 UTC (rev 14310)
@@ -2863,8 +2863,6 @@
     NSSize size = [page boundsForBox:[pdfView displayBox]].size;
     if (([page rotation] % 180) == 90)
         size = NSMakeSize(size.height, size.width);
-    CGFloat width = ceil(0.8 * fmin(size.width, size.height));
-    NSRect rect = NSMakeRect(0.5 * (size.width - width), 0.5 * (size.height - 
width), width, width);
     NSArray *stamps = nil;
     
     page = [[PDFPage alloc] init];
@@ -2871,6 +2869,8 @@
     [page setBounds:(NSRect){NSZeroPoint, size} forBox:kPDFDisplayBoxMediaBox];
     
     if ([[pdfView document] isLocked]) {
+        CGFloat width = ceil(0.8 * fmin(size.width, size.height));
+        NSRect rect = NSMakeRect(0.5 * (size.width - width), 0.5 * 
(size.height - width), width, width);
         NSString *type = [[self document] fileType];
         if ([type isEqualToString:SKPostScriptDocumentType])
             type = @"PS";

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