mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-25 16:05:52 +00:00
Ignore CPMenu -itemChanged: when unarchiving menu items
This commit is contained in:
1 parent
9af2648b22
commit
43817779c5
1 file changed
+6
-1
@@ -359,7 +359,12 @@ var _CPMenuBarVisible = NO,
|
||||
*/
|
||||
- (void)itemChanged:(CPMenuItem)aMenuItem
|
||||
{
|
||||
if ([aMenuItem menu] !== self)
|
||||
/*
|
||||
During cib unarchiving, menu items will have a reference to their menu,
|
||||
but of course the items are still being unarchived and the menu's _items
|
||||
have not yet been instantiated. In that case we will not do anything here.
|
||||
*/
|
||||
if ([aMenuItem menu] !== self || !_items)
|
||||
return;
|
||||
|
||||
[aMenuItem setValue:[aMenuItem valueForKey:@"changeCount"] + 1 forKey:@"changeCount"];
|
||||
|
||||
Reference in new issue
Block a user