Revision: 4886
http://skim-app.svn.sourceforge.net/skim-app/?rev=4886&view=rev
Author: hofman
Date: 2008-10-28 10:39:08 +0000 (Tue, 28 Oct 2008)
Log Message:
-----------
Make sure zoom methods called by super's implementation are redirected to super
in secondary pdfview
Modified Paths:
--------------
trunk/SKSecondaryPDFView.m
Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m 2008-10-28 10:17:13 UTC (rev 4885)
+++ trunk/SKSecondaryPDFView.m 2008-10-28 10:39:08 UTC (rev 4886)
@@ -307,13 +307,13 @@
- (void)setSynchronizeZoom:(BOOL)newSync adjustPopup:(BOOL)flag {
if (synchronizeZoom != newSync) {
+ BOOL savedSwitching = switching;
+ switching = YES;
synchronizeZoom = newSync;
if (newSync) {
- switching = YES;
if ([self autoScales])
[super setAutoScales:NO];
[super setScaleFactor:synchronizedPDFView ? [synchronizedPDFView
scaleFactor] : 1.0];
- switching = NO;
[self startObservingSynchronizedPDFView];
if (flag)
[scalePopUpButton selectItemAtIndex:0];
@@ -321,32 +321,44 @@
[self stopObservingSynchronizedPDFView];
[self setScaleFactor:[self scaleFactor] adjustPopup:flag];
}
+ switching = savedSwitching;
}
}
- (void)setAutoScales:(BOOL)newAuto {
- if (switching)
+ BOOL savedSwitching = switching;
+ switching = YES;
+ if (savedSwitching)
[super setAutoScales:newAuto];
else
[self setAutoScales:newAuto adjustPopup:YES];
+ switching = savedSwitching;
}
- (void)setAutoScales:(BOOL)newAuto adjustPopup:(BOOL)flag {
+ BOOL savedSwitching = switching;
+ switching = YES;
if ([self synchronizeZoom])
[self setSynchronizeZoom:NO adjustPopup:NO];
[super setAutoScales:newAuto];
if (newAuto && flag)
[scalePopUpButton selectItemAtIndex:1];
+ switching = savedSwitching;
}
- (void)setScaleFactor:(float)newScaleFactor {
- if ([self synchronizeZoom] || switching)
+ BOOL savedSwitching = switching;
+ switching = YES;
+ if ([self synchronizeZoom] || savedSwitching)
[super setScaleFactor:newScaleFactor];
else
[self setScaleFactor:newScaleFactor adjustPopup:YES];
+ switching = savedSwitching;
}
- (void)setScaleFactor:(float)newScaleFactor adjustPopup:(BOOL)flag {
+ BOOL savedSwitching = switching;
+ switching = YES;
if ([self synchronizeZoom])
[self setSynchronizeZoom:NO adjustPopup:NO];
@@ -371,6 +383,7 @@
[self setAutoScales:NO adjustPopup:NO];
[super setScaleFactor:newScaleFactor];
}
+ switching = savedSwitching;
}
- (IBAction)zoomIn:(id)sender{
@@ -584,7 +597,7 @@
- (void)handleSynchronizedScaleChangedNotification:(NSNotification
*)notification {
if ([self synchronizeZoom])
- [super setScaleFactor:[synchronizedPDFView scaleFactor]];
+ [self setScaleFactor:[synchronizedPDFView scaleFactor]];
}
- (void)handleDocumentDidUnlockNotification:(NSNotification *)notification {
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