From fb2fe3eb63b414908a40f10abab29f9b808874fc Mon Sep 17 00:00:00 2001 From: cacaodev Date: Fri, 17 Feb 2017 15:02:15 +0100 Subject: [PATCH] Enable forced frame updates in CPViewAnimator --- AppKit/CoreAnimation/CPAnimationContext.j | 5 ----- AppKit/CoreAnimation/CPViewAnimator.j | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/AppKit/CoreAnimation/CPAnimationContext.j b/AppKit/CoreAnimation/CPAnimationContext.j index 9e9d0d123..8463900c6 100644 --- a/AppKit/CoreAnimation/CPAnimationContext.j +++ b/AppKit/CoreAnimation/CPAnimationContext.j @@ -169,8 +169,6 @@ var _CPAnimationContextStack = nil, { [self stopFrameUpdaterWithIdentifier:objectId]; - if ([anObject respondsToSelector:@selector(_setForceUpdates:)]) - [anObject _setForceUpdates:YES]; } if (animationCompletion) @@ -179,9 +177,6 @@ var _CPAnimationContextStack = nil, if (needsPeriodicFrameUpdates || animationCompletion) [[CPRunLoop currentRunLoop] performSelectors]; - if (needsPeriodicFrameUpdates && [anObject respondsToSelector:@selector(_setForceUpdates:)]) - [anObject _setForceUpdates:NO]; - if (_completionHandlerAgent) _completionHandlerAgent.decrement(); }; diff --git a/AppKit/CoreAnimation/CPViewAnimator.j b/AppKit/CoreAnimation/CPViewAnimator.j index 013a6cc4c..5ee2b890d 100644 --- a/AppKit/CoreAnimation/CPViewAnimator.j +++ b/AppKit/CoreAnimation/CPViewAnimator.j @@ -63,7 +63,9 @@ { var handler = function() { + [_target _setForceUpdates:YES]; [_target performSelector:aSelector withObject:aTargetValue]; + [_target _setForceUpdates:NO]; }; [self _setTargetValue:aTargetValue withKeyPath:aKeyPath fallback:handler completion:handler];