Source/GGBLayer.m
changeset 14 4585c74d809c
parent 11 436cbdf56810
child 15 73f8c889f053
     1.1 --- a/Source/GGBLayer.m	Sat Jul 05 17:46:43 2008 -0700
     1.2 +++ b/Source/GGBLayer.m	Tue Jul 08 20:32:52 2008 -0700
     1.3 @@ -56,10 +56,14 @@
     1.4      _curAnimation = (id)[self animationForKey: @"animateAndBlock:"];
     1.5      [self setValue: to forKeyPath: keyPath];    // animation doesn't update the property value
     1.6  
     1.7 -    // Now wait for it to finish:
     1.8 -    while( _curAnimation ) {
     1.9 -        [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode//NSEventTrackingRunLoopMode
    1.10 -                                 beforeDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]];
    1.11 +    if( self.presentationLayer ) {
    1.12 +        // Now wait for it to finish:
    1.13 +        while( _curAnimation ) {
    1.14 +            [[NSRunLoop currentRunLoop] runMode: NSDefaultRunLoopMode//NSEventTrackingRunLoopMode
    1.15 +                                     beforeDate: [NSDate dateWithTimeIntervalSinceNow: 0.1]];
    1.16 +        }
    1.17 +    } else {
    1.18 +        _curAnimation = nil;
    1.19      }
    1.20  }
    1.21