Source/BitHolder.m
changeset 9 a59acc683080
parent 0 e9f7ba4718e1
child 10 6c78cc6bd7a6
     1.1 --- a/Source/BitHolder.m	Fri Mar 07 11:43:02 2008 -0800
     1.2 +++ b/Source/BitHolder.m	Thu May 29 15:04:06 2008 -0700
     1.3 @@ -46,8 +46,12 @@
     1.4  - (void) setBit: (Bit*)bit
     1.5  {
     1.6      if( bit != self.bit ) {
     1.7 -        if( bit && _bit )
     1.8 -            [_bit destroy];
     1.9 +        if( _bit ) {
    1.10 +            if( bit )
    1.11 +                [_bit destroy];
    1.12 +            else
    1.13 +                [_bit removeFromSuperlayer];
    1.14 +        }
    1.15          setObj(&_bit,bit);
    1.16          ChangeSuperlayer(bit,self,-1);
    1.17      }