Revision: 7020
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7020&view=rev
Author:   hofman
Date:     2010-12-28 16:06:48 +0000 (Tue, 28 Dec 2010)

Log Message:
-----------
Set default PDF view settings after zero delay when unlocking, because PDFView 
resets them when loading a locked document and when unlocking

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2010-12-28 15:59:32 UTC (rev 7019)
+++ trunk/SKMainWindowController.m      2010-12-28 16:06:48 UTC (rev 7020)
@@ -479,9 +479,6 @@
     [self registerForNotifications];
     [self registerAsObserver];
     
-    if (hasWindowSetup)
-        [savedNormalSetup removeAllObjects];
-    
     if ([[pdfView document] isLocked])
         [[self window] makeFirstResponder:[pdfView 
subviewOfClass:[NSSecureTextField class]]];
     
@@ -1929,8 +1926,9 @@
 }
 
 - (void)documentDidUnlock:(NSNotification *)notification {
-    // when the PDF was locked the default PDF view settings will be lost, 
unfortunately changing them back here makes no difference, because this method 
is sent too early
     [self updatePageLabelsAndOutlineForExpansionState:nil];
+    // when the PDF was locked, PDFView resets the display settings, so we 
need to reapply them, however if don't delay it's reset again immediately
+    [self performSelector:@selector(applyPDFSettings:) 
withObject:[savedNormalSetup count] ? savedNormalSetup : [[NSUserDefaults 
standardUserDefaults] dictionaryForKey:SKDefaultPDFDisplaySettingsKey] 
afterDelay:0.0];
 }
 
 - (void)document:(PDFDocument *)aDocument didUnlockWithPassword:(NSString 
*)password {


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

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to