Revision: 5023
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5023&view=rev
Author:   hofman
Date:     2008-12-04 16:01:23 +0000 (Thu, 04 Dec 2008)

Log Message:
-----------
Don't interpret zero scale factor as auto in special pdfviews

Modified Paths:
--------------
    trunk/SKSecondaryPDFView.m
    trunk/SKSnapshotPDFView.m

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2008-12-04 12:20:55 UTC (rev 5022)
+++ trunk/SKSecondaryPDFView.m  2008-12-04 16:01:23 UTC (rev 5023)
@@ -399,25 +399,14 @@
     switching = YES;
     if ([self synchronizeZoom])
         [self setSynchronizeZoom:NO adjustPopup:NO];
-       
     if (flag) {
-               if (newScaleFactor < 0.01) {
-            newScaleFactor = 0.0;
-        } else {
-            unsigned int i = [self indexForScaleFactor:newScaleFactor];
-            [scalePopUpButton selectItemAtIndex:i];
-            newScaleFactor = SKDefaultScaleMenuFactors[i];
-        }
+               unsigned int i = [self indexForScaleFactor:newScaleFactor];
+        [scalePopUpButton selectItemAtIndex:i];
+        newScaleFactor = SKDefaultScaleMenuFactors[i];
     }
-    
-    if (newScaleFactor < 0.01) {
-        if ([self autoScales] == NO)
-            [self setAutoScales:YES];
-    } else {
-        if ([self autoScales])
-            [self setAutoScales:NO adjustPopup:NO];
-        [super setScaleFactor:newScaleFactor];
-    }
+    if ([self autoScales])
+        [self setAutoScales:NO adjustPopup:NO];
+    [super setScaleFactor:newScaleFactor];
     switching = savedSwitching;
 }
 

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2008-12-04 12:20:55 UTC (rev 5022)
+++ trunk/SKSnapshotPDFView.m   2008-12-04 16:01:23 UTC (rev 5023)
@@ -253,23 +253,14 @@
 }
 
 - (void)setScaleFactor:(float)newScaleFactor adjustPopup:(BOOL)flag {
-    
        if (flag) {
-               if (newScaleFactor < 0.01) {
-            newScaleFactor = 0.0;
-        } else {
-            unsigned int i = [self indexForScaleFactor:newScaleFactor];
-            [scalePopUpButton selectItemAtIndex:i];
-            newScaleFactor = BDSKDefaultScaleMenuFactors[i];
-        }
+               unsigned int i = [self indexForScaleFactor:newScaleFactor];
+        [scalePopUpButton selectItemAtIndex:i];
+        newScaleFactor = BDSKDefaultScaleMenuFactors[i];
     }
-    
-    if(newScaleFactor < 0.01){
-        [self setAutoFits:YES];
-    }else{
+    if ([self autoFits])
         [self setAutoFits:NO adjustPopup:NO];
-        [super setScaleFactor:newScaleFactor];
-    }
+    [super setScaleFactor:newScaleFactor];
 }
 
 - (void)setAutoScales:(BOOL)newAuto {}


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to