mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 16:12:58 +00:00
Fixed: added a boolean to avoid to addObservers seveal times
This commit is contained in:
1 parent
ce0233d0a2
commit
bd20050db8
1 file changed
+9
@@ -228,6 +228,8 @@ var CPViewFlags = { },
|
||||
Function _toolTipFunctionIn;
|
||||
Function _toolTipFunctionOut;
|
||||
BOOL _toolTipInstalled;
|
||||
|
||||
BOOL _isObserving;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -844,14 +846,21 @@ var CPViewFlags = { },
|
||||
|
||||
while (count--)
|
||||
[_subviews[count] _removeObservers];
|
||||
|
||||
_isObserving = NO;
|
||||
}
|
||||
|
||||
- (void)_addObservers
|
||||
{
|
||||
if (_isObserving)
|
||||
return;
|
||||
|
||||
var count = [_subviews count];
|
||||
|
||||
while (count--)
|
||||
[_subviews[count] _addObservers];
|
||||
|
||||
_isObserving = YES;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in new issue
Block a user