Skip to content

Commit

Permalink
Fixed implicit animations in <10.8 screwing up print preview scrolling.
Browse files Browse the repository at this point in the history
  • Loading branch information
alinebee committed Nov 15, 2012
1 parent 287f8fa commit 01cb6bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Boxer/Printing/BXPrintStatusPanelController.m
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,13 @@ - (void) _syncPagePosition
CGFloat bottomOffset = 15;
CGFloat yPos = (self.pageSize.height * self.feedOffset) - bottomOffset;

//Disable implicit movement animations on <10.7
[CATransaction begin];
[CATransaction setAnimationDuration: 0];
self.currentPage.position = CGPointMake(NSMidX(self.bounds), yPos);
self.previousPage.position = CGPointMake(NSMidX(self.bounds),
CGRectGetMaxY(self.currentPage.frame) + self.previousPage.bounds.size.height);
[CATransaction commit];

[self.paperFeed setNeedsDisplay];
}
Expand All @@ -373,7 +377,6 @@ - (void) animateHeadToOffset: (CGFloat)headOffset
{
//Don't bother animating the head's position as it moves so fast any animation would be interrupted.
self.headOffset = headOffset;
//[self.animator setHeadOffset: headOffset];
}

- (void) animateFeedToOffset: (CGFloat)feedOffset
Expand Down

0 comments on commit 01cb6bd

Please sign in to comment.