FIXED: Previous commit about explicitely define the observing options broke the abolity to hide buttons in CPButtonBar

This patch ensure to correctly set the options
This commit is contained in:
Antoine Mercadal
2014-10-20 19:36:48 -07:00
parent f2956670cd
commit 8eb52f9a88
+3 -1
View File
@@ -28,6 +28,8 @@
@global CPPopUpButtonStatePullsDown
@global CPKeyValueChangeOldKey
@global CPKeyValueChangeNewKey
@global CPKeyValueObservingOptionNew
@global CPKeyValueObservingOptionOld
@implementation CPButtonBar : CPView
{
@@ -137,7 +139,7 @@
for (var i = [_buttons count] - 1; i >= 0; i--)
{
[_buttons[i] addObserver:self forKeyPath:@"hidden" options:nil context:nil];
[_buttons[i] addObserver:self forKeyPath:@"hidden" options:CPKeyValueObservingOptionNew | CPKeyValueObservingOptionOld context:nil];
[_buttons[i] setBordered:YES];
}