Remove old tracking rect before adding it.

This commit is contained in:
Mitchell Livingston 2006-07-15 18:48:17 +00:00
parent 7a53b3b54d
commit 5c9cad43d5
2 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,8 @@
NSString * fPrefString, * fPrefKey;
BOOL fEnabled;
NSTrackingRectTag trackingTag;
}
- (void) setText: (NSString *) text;

View File

@ -67,7 +67,7 @@
- (void) awakeFromNib
{
[self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO];
trackingTag = [self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO];
}
- (void) dealloc
@ -160,6 +160,7 @@
- (void) resetBounds: (NSNotification *) notification
{
[self removeTrackingRect: trackingTag];
[self addTrackingRect: [self bounds] owner: self userData: nil assumeInside: NO];
}